Small Utility to automate gcode upload to klipper after slicing in e.g. PrusaSlicer.
Inspired by this thread on GitHub I decided to create a small automation utility for improvement of my workflow for generating gcode and 3D-printing.
I like to use PrusaSlicer, and unfortunately it has no way to export gcode to a Creality SonicPad.
After gcode-export in the directory monitored by this programm,
the gcode-file gets uploaded to Klipper using Moonraker-API.
Console output will look like this:
Find the docu of the file upload in Moonraker here.
A shell script for Linux users adds some convenience.
If you want the more fancy version with some cool sounds you can lunch the run_klipper_upload_service_fancy.sh
wich activates sounds.
This might be a little hard to get that running on Windows as it uses the Linux application SoX... (maybe try this approach to get that running on Windows)
On Linux you might have to install sudo apt install sox
and run a sudo apt install libsox-fmt-mp3
to install mp3-libs.
Sound effects are downloaded from Pixabay Thx!.
If pipenv isn't installed on your system run
pip install pipenv
Install your virtual env using pipenv by running
pipenv install
pipenv shell
<WHEREEVER _YOUR_VENVS_LIVE>/klipper_upload-cINr6ycz/bin/python
<WHEREEVER_YOUR_CODE_LIVES>
/gcode_upload_to_moonraker.py -d <YOUR_DIR_TO_MONITOR> -i <MOONRAKER_IP>"
short | long | meaning |
---|---|---|
-i | --ip_address | IP-address of Moonraker |
-d | --observed_dir | directory to monitor for gcode files |
-f | --fancy | fancy mode, play sounds, optional, default =False |