Advertisement
freestyler7

imgur

Aug 16th, 2013
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.32 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. function uploadImage {
  4.   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/[^<]*"
  5. }
  6.  
  7. scrot -s "shot.png"
  8. uploadImage "shot.png" | xclip -selection c
  9. rm "shot.png"
  10. notify-send "Done"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement