pasteros

copy and paste your life

pasteroshoot.sh

Tag: pasteros

Date: August 10, 2016 07:38 ( 229.45 days ago ) | Download download | Raw raw | Markdown raw | QR Code

#!/bin/bash

function uploadImage {
 content=$(cat $1 | base64 -w 0)
 pasteid=$(curl -silent -H "Expect:" -X POST -d $content https://pasteros.io/api/v1/simplecreate | tail -1)
 echo "https://pasteros.io/$pasteid.jpg"  | xclip -selection c
}

DISPLAY=:0.0 scrot -s "shot.jpg" 
uploadImage "shot.jpg"
rm "shot.jpg"
notify-send "Done"

Create a new version

Change theme: