Created
December 17, 2011 01:41
-
-
Save cvan/1488826 to your computer and use it in GitHub Desktop.
auto upload mac screenshots to imgur
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
function ss { | |
IMGUR_API_KEY="GET_YOUR_OWN" | |
SCREENSHOT="/tmp/`date +%s`.png" | |
screencapture -iW ${SCREENSHOT} | |
echo "Sending ${SCREENSHOT} ..." | |
curl -F "image=@${SCREENSHOT}" -F "key=${IMGUR_API_KEY}" http://api.imgur.com/2/upload.xml | sed "s/.*<original>\([^<]*\).*<.*/\1/" | pbcopy | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment