Created
January 7, 2011 18:47
-
-
Save chaoxu/769905 to your computer and use it in GitHub Desktop.
Take a screenshot and upload to imageshack.us, then copy the link to clipboard. Allow one argument, use s for selection, a integer for amount of seconds to wait. (Can't do both)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
rm screenshot.png -f | |
if [ $# -ne 0 ] | |
then | |
if [ "X$1" = "Xs" ] | |
then | |
scrot screenshot.png -s | |
else | |
scrot screenshot.png -d $1 | |
fi | |
else | |
scrot screenshot.png | |
fi | |
curl -H Expect: -F fileupload="@screenshot.png" -F xml=yes -# "http://www.imageshack.us/index.php" | grep image_link | grep -o http[^\<]* | xclip -selection clipboard |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment