upload image to imgur [debian-mate]

based on:
http://www.webupd8.org/2016/04/take-screenshots-and-upload-to-imgur.html

install dependencies:
sudo apt-get install libnotify-bin scrot xclip curl grep

install it:
cd ~/
mkdir ~/Pictures
git clone https://github.com/jomo/imgur-screenshot.git
cd ~/imgur-screenshot/
sudo install imgur-screenshot.sh /usr/local/bin/imgur-screenshot

then you can use it from terminal:
imgur-screenshot

or create a starter:
get an icon:
mkdir ‐p ~/.local/share/icons/
cd ~/.local/share/icons/
wget -O imgur.png http://imgur.com/favicon.ico

cd ~/.local/share/applications
nano imgur-screenshot.desktop

[Desktop Entry]
Name=imgur-screenshot
Comment=select an area to upload to imgur
Exec=imgur-screenshot
Icon=/home/xxUserxx/.local/share/icons/imgur.png
Terminal=false
Type=Application
Categories=System;Utility;Application;

use the correct username in starter:
cd ~/.local/share/applications
sed -i 's/xxUserxx/'$USER'/' imgur-screenshot.desktop

caja script to upload from filemanager in mate:
touch ~/.config/caja/scripts/caja_script
chmod +x ~/.config/caja/scripts/caja_script
nano ~/.config/caja/scripts/caja_script

#!/bin/bash

IFS=$'\n'

for FILENAME in $CAJA_SCRIPT_SELECTED_FILE_PATHS; do
 if [ -f "$FILENAME" ]; then
  imgur-screenshot "$FILENAME"
 fi
done

usage of the script:
rightclick an image > scripts > upload to imgur

Advertisements

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