Skip to content

Instantly share code, notes, and snippets.

@thomasdunn
Created January 24, 2017 15:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thomasdunn/bd069937ec84582dfcd648c5e19cf88d to your computer and use it in GitHub Desktop.
Save thomasdunn/bd069937ec84582dfcd648c5e19cf88d to your computer and use it in GitHub Desktop.
Simplify3D to Octoprint GCODE upload
for %%a in (%1) do (
set file=%%~fa
set filepath=%%~dpa
set filename=%%~nxa
)
echo curl -k -H "X-Api-Key: <Octoprint API Key>" -F "select=true" -F "print=false" -F "file=@%filepath%%filename%" --user "<HTTP_Basic_Auth_User>:<HTTP_Basic_Auth_Password>" "http://octopi/api/files/local" > C:\design\octoprint\octoprint.bat
REM to actually execute the upload, run C:\design\octoprint\octoprint.bat
REM this goes under: Edit Process > Scripts > Post Processing > Additional commands:
cmd /c C:\design\octoprint\gcode.bat "[output_filepath]"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment