Commit 09de3abc by Fred Smith

imgur screenshots for linux

parent 5285b732
#! /usr/bin/env bash
scrot -e '~/bin/imgur_upload $f; mv $f ~/Pictures/screenshots'
#! /usr/bin/env bash
scrot -s -b -e '~/bin/imgur_upload $f; mv $f ~/Pictures/screenshots'
#! /usr/bin/env bash
. ~/Documents/passwords.txt
curl -d username=$IMGUR_USER -d password=$IMGUR_PASS -c /tmp/imgur_cookie.txt http://api.imgur.com/2/signin
imgur_hash=$(curl -F "image=@$1" -b /tmp/imgur_cookie.txt http://api.imgur.com/2/upload.xml | grep -v "version" | sed -e 's/<\/imgur_page.*//' -e 's/.*imgur_page>//' -e 's/.*\///')
curl -b /tmp/imgur_cookie.txt -d add_images=$imgur_hash http://api.imgur.com/2/account/albums/qPjvx &> /dev/null
rm /tmp/imgur_cookie.txt
echo http://derf.imgur.com/screenshots#$imgur_hash
#! /usr/bin/env bash
scrot -s -b -e '~/bin/imgur_upload $f; mv $f ~/Pictures/screenshots'
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment