If you are using Angstrom, follow these instructions: https://github.com/foosel/OctoPrint/wik ... g-Ångström
I have the rev C, which runs stock Debian, so it is a little simpler:
Set up a separate user for OctoPrint:
sudo usermod -a -G tty,dialout octo
Get the source:
git clone http://github.com/foosel/OctoPrint
Switch to the devel branch (needed for the better API):
git checkout devel
Make the OctoPrint source directory the home directory for the octo user:
sudo mv OctoPrint /home/octo
sudo chown octo.octo /home/octo
Log in as the octo user, using the password you used. Type "./run &" to start the server. You will want to set this up to start automatically through init scripts, but I leave that as an exercise.
Go to http://beaglebone.local:5000/ (or whatever the hostname or IP address of your Beaglebone is) and set it up to run properly. Open the settings, go to the API section, enable it and make a note of your API key.
Now for the Mac bit:
Create the folder you want to use.
Run the Automator app (you can do this using AppleScript and Folder Actions, but after doing some research it seems that Automator is not only easier, but works more reliably).
Create a new Folder Action.
Add a Run Shell Script action, under Utilities.
Select the folder you just created, and choose "Pass input: as arguments".
For the body, enter:
Code: Select all
api_key=YOUR_API_KEY for f in "$@" do curl -H "X-Api-Key: $api_key" -F select=true -F print=false -F file=@$f http://beaglebone.local:5000/api/files/local done
Save your folder action and give it a name, like "Upload to OctoPrint".
Once you have saved it, it is active. In your slicer, save the gcode to your folder, and watch it appear shortly in your OctoPrint file list.