ups

Simple screenshot uploading scripts for Uguu-powered file hosts like f.kotori.me.

Unix (scrot)

#!/bin/sh

cd $HOME/Pictures/Screenshots
scrot $* -e 'curl -F file=@$f -F randomname=yes http://f.kotori.me/api.php?d=upload'
echo

Arguments get passed on to scrot, eg. ups -s to interactively select a window or rectangle with the mouse.

ups outputs a link to the image that can easily be used with other programs:

Plan 9

#!/bin/rc

f=$HOME/Pictures/Screenshots/`{date -n}^.png
topng $f
hpost -u http://f.kotori.me randomname:'yes' file@$f | rc
echo

License

Distributed under the ISC license.