Created
January 8, 2015 07:07
-
-
Save rasshofer/a3e5614db5aa2b4853fa to your computer and use it in GitHub Desktop.
OS X: Take a screenshot, upload the screenshot to PicPig and copy the URL to your clipboard
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 | |
API_KEY="abc123" | |
API="https://picpig.com/api/$API_KEY" | |
FILE="screencapture-`date +%s`.png" | |
# Capture screen interactively by selection or window | |
screencapture -i $FILE | |
# Capture the main monitor | |
screencapture -m $FILE | |
curl -fsk -F "image=@$FILE" $API | pbcopy | |
rm $FILE |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If you’re using Alfred, you may create a custom workflow and assign custom hotkeys (e.g.
⌘
+⌥
+3
to capture the main screen and⌘
+⌥
+4
to capture a selection or window interactively) that execute the scripts above. This makes the whole process invisible and perfect for daily use.You can find your personal API key at https://picpig.com/api.