Uploading images to imgur from the Linux/Mac command line

I have been using this for a few years and felt it worthwhile sharing. Add the following to your .profile, .bashrc, etc:

imgur(){
  for i in "$@";do
    curl -# -F "image"=@"$i" -F "key"="b822c1d8c517c03062a48a1181ec0cd2" http://api.imgur.com/2/upload.xml|\
    grep -Eo '<[a-z_]+>http[^<]+'|sed 's/^<.\|_./\U&/g;s/_/ /;s/<\(.*\)>/\x1B[0;34m\1:\x1B[0m /'
  done
}

Then, when you load a new shell, you should be able to do something like:

(0)(18:23:23)chuck@sepang:~$ imgur gmailcounts2.jpg 
######################################################################## 100.0%
Original: http://i.imgur.com/KEguAM4.jpg
Imgur Page: http://imgur.com/KEguAM4
Delete Page: http://imgur.com/delete/JJfaLyU8HYnAVrF
Small Square: http://i.imgur.com/KEguAM4s.jpg
Large Thumbnail: http://i.imgur.com/KEguAM4l.jpg
    • Nice
    • August 16th, 2015

    Nice, thanks!

    How would be the delete command from such URL, also via cUrl?

  1. Buut if you already have the most coveted bits of paper with yyou as well certain situation, whatever you will
    have too do is enter the vednue and have a fantastic
    game to watch. And Seattfle Seahawks tickets aare
    some of the available products onnline which you can buy handily.

    The next thijg to perform after choosing an offer is usually to
    look for the credibility off the website.

  1. August 24th, 2016
    Trackback from : cpcy.99456.net
  2. January 1st, 2017
  3. August 21st, 2017
    Trackback from : Saiba mais aqui

&nbsp;