How-To: Auto Upload Screenshots to Imgur (cross-platform)

Here is a quick tip to speed up your internet meme sharing prowess 🙂

Dependencies:

  • gnome-screenshot
  • imgurbash
  • For ease of use, make a “imgur” directory under your “Pictures” home folder.

Optional Dependencies: (the URLs are put on the X selection for easy pasting.)

  • xsel
  • or
  • xclip is available,

The command:

gnome-screenshot -i ; cd /home/$USER/Pictures/imgur ; imgurbash Screen* ; 
mv Screen* imgur_upload_$(date +%Y%M%d_%H:%M)

Now, let’s create the bash script (it is all ONE line):

sudo vim /usr/bin/imgur.sh

Now, paste the following into the new file:

The main command is all ONE line.

Make that file executable:

 sudo chmod +x /usr/bin/imgur.sh

Let’s add this functionality to your menu. In this example I am using gnome3/cinnamon (optional):

https://i0.wp.com/i.imgur.com/TIKPZ6K.png

This is alacarte, a handy editor for gnome-based Desktop Environments. Click Accessories > New Item

Fill in these EXACT settings

Now, you should be able to type “imgur.sh” in the terminal or “imgur” in your “Start Menu”, and voila, instant clip+upload. I am still adding functionality to hook into xsel (X window copy/paste selection). I know, this was shoddy/cruddy, but works for me 🙂

Questions? Comments?i

_professor

Advertisements

About professorkaos64

www.libregeek.org

Posted on 20130819, in How-To and tagged , , , , , , . Bookmark the permalink. 2 Comments.

  1. Have you added some functionality to the script?
    If you had, I’d apreciate if you update the post with it 😀
    I use imgur to upload every image I share on internet and it’s really useful to have an automatic tool to do this kind of task.

    • professorkaos64

      I haven’t looked at this too much lately. I made this particulary because I was irritated I could not use the very nice imgur uploader (Gnome Desktop Environment) under Cinnamon Desktop or others. I could make this a little better if I have time soon. Check back next week sometime, ill see if I can make this a little “cleaner” or throw it up on github to make it easy to grab the latest.

      Thanks for reading

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s