You can probably use this with other tools as well, but I created this for flameshot.
- Clone the repository
- Go put the server folder in your host's directory.
- Go create a TOKEN for yourself (You can just smash your keyboard too)
- change the
server/app.jsfile so that TOKEN is YOUR token. - change the
local/main.pyfile so thatconfig['token']is YOUR token andconfig['url']is your URL (Keep the/at the end). - Start app.js on your host.
- Install Pyperclip
Now here comes the fun part, since flameshot allows us to copy the image thru a command, we will use the bytes that flameshot gives us and convert them to an actual image with the help of our main.py.
So the command is this:
flameshot gui -r | python3 your-directory-to/local/main.py
What you can do is add a custom shortcut to your keyboard to trigger this command.
Once the command gets executed, you should have the url to the picture on your clipboard so that you can just paste it anywhere you want.
You can always create a pull request or an issue.