aboutsummaryrefslogtreecommitdiff
path: root/tools/imgur
diff options
context:
space:
mode:
authorVasil Zlatanov <vasil.zlatanov@gmail.com>2015-04-12 13:05:47 +0200
committerVasil Zlatanov <vasil.zlatanov@gmail.com>2015-04-12 13:05:47 +0200
commit47a0a3f433f820fc78d180884f6ca376fba97b73 (patch)
tree587b80062ebdb947d26ca7a70e32b38b7d67ca45 /tools/imgur
parent269e617fea39658233db38ad503030c4fe040e80 (diff)
downloaddotfiles-47a0a3f433f820fc78d180884f6ca376fba97b73.tar.gz
dotfiles-47a0a3f433f820fc78d180884f6ca376fba97b73.tar.bz2
dotfiles-47a0a3f433f820fc78d180884f6ca376fba97b73.zip
Tidy up everything :)
Diffstat (limited to 'tools/imgur')
-rwxr-xr-xtools/imgur8
1 files changed, 8 insertions, 0 deletions
diff --git a/tools/imgur b/tools/imgur
new file mode 100755
index 0000000..59e4199
--- /dev/null
+++ b/tools/imgur
@@ -0,0 +1,8 @@
+#!/bin/bash
+function uploadImage {
+ curl -s -F "image=@$1" -F "key=486690f872c678126a2c09a9e196ce1b" https://imgur.com/api/upload.xml | grep -E -o "<original_image>(.)*</original_image>" | grep -E -o "http://i.imgur.com/[^<]*"
+}
+
+scrot ~/Pictures/scrot.png
+uploadImage ~/Pictures/scrot.png | perl -pe chomp | xclip
+notify-send "Image uploaded, link in selection"