A script to automate uploading images, along with their data, to a szurubooru imageboard as they are saved using Grabber.
- Python 3 (Latest Version is the best but should work >=3.8)
- Requests (
pip install requests
or usepip install -r requirements.txt
in the root folder) - Grabber
- Make sure you have all the requirements!
- Download the szurubooru.py and config.ini file and place it in the root directory of your Grabber installation.
- Open and edit the config.ini file according to your details of you Szurubooru installation, username (Go to account tab), token ("Login tokens" tab in your account tab), api_url (Should be 'http://localhost:8080/api' if you did a default installation)
- Open Grabber, go to Tools, go to Options (Ctrl-P), then Commands and in the image field enter:
python szurubooru.py "%all:includenamespace,unsafe,underscores%" "%rating%" "%source:unsafe%" "%path:nobackslash%"
- Just save an image anywhere and it should automatically be uploaded to your szurubooru server.
- There should be an output.txt file in the root directory of Grabber with the JSON response of the webserver. Use it for troubleshooting if something doesn't work.
- If there is no output.txt, check the Grabber logs to make sure the script is run. If there's an error try running the Grabber executable from the root directory with admin rights and not from the shortcut.
- The script doesn't automatically delete the images after they are saved so keep that in mind.