Imgur bash function to upload images

Sign up for a GitHub account Sign in All Gists colby / imgur.sh Last active January 28, 2015 Code Revisions 2 /.sunken-menu-group /.sunken-menu-contents Embed HTTPS SSH You can clone with HTTPS or SSH . Download Gist /.only-with-full-nav Imgur bash function to upload images View imgur.sh imgur.sh Raw File suppressed. Click to show. 1 2 3 4 5 6 7 # Note: uses some random ClientID for authentication, does not handle errors # Usage: $ imgur ~/Desktop/oleg.png function imgur { [ $# -lt 1 ] && echo " imgur: requires an image file path " && exit 1 curl -sH " Authorization: Client-ID 3e7a4deb7ac67da " -F " image=@ $1 " " https://api.imgur.com/3/upload " | grep -oE " http:.*\.[a-z]{3,4} " | tr -d ' \ ' } Sign up for free to join...

Linked on 2015-01-28 19:12:17 | Similar Links