/imgur-upload

Upload image to Imgur using the official Imgur python client library

Primary LanguagePython

Imgur Upload

  • Upload an image to an Imgur account
  • Easy to integrate with Linux desktop usage
  • Supports desktop notifications, copy to clipboard and open in browser
  • Communicates with the Imgur API using the official Imgur python client library

Configuration

See The Imgur API - Authentication.

As this application is not official or in any way endorsed by Imgur (see imgur.com/tools) you have to fix registration and authentication yourself. See imgurpython - library usage to get an idea how this is done.

Once done, fill in your account properties in .imgurrc and copy it to your $HOME directory. Designed to upload to an account, but could also be used for anonymous uploads.

Simple usage

  1. Place imgur.py somewhere in your $PATH, e.g. /home/user/bin/imgur.py.

  2. Run with path to an image as argument:

     $ imgur.py shot0001.png
    

Linux desktop usage

  1. Place imgur.py somewhere in your $PATH, e.g. /home/user/bin/imgur.py.

  2. Update the paths in Imgur.desktop, optionally with an icon of choice.

  3. Copy Imgur.desktop to $HOME/.local/share/applications or similar depending on setup. Consult the documentation of your distro and the MIME application specification on Freedesktop.org.

  4. Update mimeapps.list with file associations to whatever file types you want, e.g:

     [Added Associations]
     image/gif=kde4-gwenview.desktop;gimp.desktop;Imgur.desktop;
     image/jpeg=kde4-gwenview.desktop;gimp.desktop;Imgur.desktop;
     image/png=kde4-gwenview.desktop;gimp.desktop;Imgur.desktop;
    
  5. The Imgur Upload application should now be available on "Open With.." and any other menus using the MIME associations.

Open With...

Demo

See imgur_screenshot.ogv for a demo using KDE's ksnapshot tool for taking a screenshot, uploading it to Imgur using the PNG file association and finally opening it in the default browser.