A small tool for publishig things to Thingiverse.
The tool is very rudimentary and needs some code-clenup, but it does it's job, which is to upload a 3D model to Thingiverse. It is in a very early stage of development, so expect breaking changes.
- Python 3.6 or later
- python3-docopt
- python3-requests
- A Thingiverse account
- A Thingiverse Bearer token
sudo make install
sudo make uninstall
Place a file .thingiverse_publisher.jso
in your home directory with the following content (see below on how to get a bearer token):
{
"bearer_token": "123456789abcdef123456789abcdef12"
"username": "nomike"
}
Place a file .thingiverse_publisher.jso
in the directory of your 3D model. The file should look like this:
{
"thing": {
"name": "i3 PTFE tube cutting measure",
"category": "Art",
"tags": [
"foo",
"bar",
"baz"
],
"instructions": "Print and enjoy",
"is_wip": true,
"license": "gpl3",
},
"files": [
"i3-ptfe-tube-cutting-measure.scad",
"i3-ptfe-tube-cutting-measure.stl"
],
"images": []
}
- Go to https://www.thingiverse.com/apps/create
- Fill in the form
- Click on "Create Application"
- Copy the "Client ID" and "Client Secret" to a safe place
- Open a browser and go to
https://www.thingiverse.com/login/oauth/authorize?client_id=YOUR_CLIENT_ID&redirect_uri=urn:ietf:wg:oauth:2.0:oob&response_type=code
- Click on "Allow"
- Copy the code from the address bar
- Open a terminal and run the following command:
curl -X POST -d "client_id=YOUR_CLIENT_ID&client_secret=YOUR_CLIENT_SECRET&code=YOUR_CODE&grant_type=authorization_code" https://www.thingiverse.com/login/oauth/access_token
- Copy the
access_token
to your.thingiverse_publisher.json
file