Last active
March 26, 2017 15:05
-
-
Save akhenakh/9593117 to your computer and use it in GitHub Desktop.
Screenshot, upload and share from your Google drive
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 | |
# 1st Install https://github.com/prasmussen/gdrive | |
# then use this script in Alfred or from CLI when you want to screenshot then upload to your gdrive | |
# then share the link to others from your paste board | |
# (run gdrive one first time to authenticate with Google) | |
screencapture -tjpg -i /tmp/temp_shot_gdrive.jpg | |
DATEFILENAME=`date +"%Y%m%d%H%M"` | |
# use -p id to upload to a specific folder | |
ID=`gdrive upload -f /tmp/temp_shot_gdrive.jpg -t screenshot${DATEFILENAME} --share | egrep "^Id:" | awk '{print $2}'` | |
echo https://drive.google.com/uc?id=${ID} | pbcopy |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Update with gdrive 2.1!