i made something this afternoon (just finished it)
to take a screenshot, upload it to ftp, and then
open my browser on that page to check it.
ingredients:
scrot
lftp
a browser
first, i created a directory ~/.shot_script to put
everything in. then, i created 'shot.ftp' in that
dir, which contains the following commands
to be called for by lftp:
Code: Select all
open ftp://username:password@server.com
rm shot.png
put ~/.shot_script/shot.png
exit
this will connect to your server of choice, remove
any existing screenshot, then put your new shot
where it was, and then it will end lftp.
next, i created the file 'shot.script', which holds
the commands to take the screenshot, run lftp
set to run commands from shot.ftp, remove the
shot which was just uploaded and then it will
run your browser of choice which will open the
url to your shot.
Code: Select all
scrot ~/.shot_script/shot.png
lftp -f ~/.shot_script/shot.ftp
rm ~/.shot_script/shot.png
[browser] http://url_to_shot.png
next, i ran chmod +x ~/.shot_script/shot.script
to make the script executable.
and last but not least, i added a link to that
script in my popup menu (which will cause scrot
to take a shot without the popup menu open,
since the popup menu closes at release so the
shot is nice and clean).
the command to put in your menu is:
exec ~/.shot.script
that's all folks. enjoy.