This script will most probably rarely get commits - if you wish to use an updated script, SKRRRTT has made his own repo with his own script improvements over here
A simple script that utilizes cURL and some bash for uploading your images taken via flameshot to an image hosting service.
The following packages are required to be installed:
- xclip
- jq
- flameshot
Most distributions are based on Ubuntu or Debian, and will use apt: sudo apt install xclip jq flameshot
If you use anything not Ubuntu/Debian-based, then you should know your way around a package manager.
Download the script or clone the entire repo using:git clone https://github.com/c-um/flameshot-custom-uploader/
Give the script execution permissions using chmod +x ./scriptname.sh
(or chmod +x scriptname.sh
, both work.)
Edit the script using any editor you wish (e.g nano scriptname.sh
) and change the URL to your desired host, including putting in your API key.
After editing the script try uploading any image and make sure to check the returned field name by simply doing cat /tmp/upload.json
The most common returned field will be along the lines of imageUrl
, just edit the script and replace the:
jq -r ".imageUrl"
with jq -r ".FieldNameHere
Credits:
Everyone over at the Flameshot Organization for actually creating Flameshot
Tanner Reynolds / the entire ShareS Project for the flameshot example script