mirror of https://github.com/tycrek/ass
parent
64428d9759
commit
842a02fd0a
@ -1,22 +1,19 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
IMAGEPATH="$HOME/Pictures/" #where to hold the screenshots before they are deleted
|
IMAGEPATH="$HOME/Pictures/" # Where to store screenshots before they're deleted
|
||||||
IMAGENAME="ass" #Not really important, tells flameshot what file to send and delete
|
IMAGENAME="ass" # Not really important, tells Flameshot what file to send and delete
|
||||||
KEY="" #Enter auth key
|
KEY="" # Your ass upload token
|
||||||
DOMAIN="" #your upload domain
|
DOMAIN="" # Your upload domain
|
||||||
|
|
||||||
flameshot config -f $IMAGENAME #Make sure that flameshot names the file correctly
|
flameshot config -f "$IMAGENAME" # Make sure that Flameshot names the file correctly
|
||||||
flameshot gui -r -p $IMAGEPATH #Prompt the screenshot GUI
|
flameshot gui -r -p "$IMAGEPATH" # Prompt the screenshot GUI
|
||||||
|
|
||||||
#Upload the image and copy the response URL
|
# Upload the image and copy the response URL
|
||||||
URL=$(curl -X POST \
|
URL=$(curl -X POST \
|
||||||
-H "Content-Type: multipart/form-data" \
|
-H "Content-Type: multipart/form-data" \
|
||||||
-H "Accept: application/json" \
|
-H "Accept: application/json" \
|
||||||
-H "User-Agent: ShareX/13.4.0" \
|
-H "User-Agent: ShareX/13.4.0" \
|
||||||
-H "Authorization: $KEY" \
|
-H "Authorization: $KEY" \
|
||||||
-F "file=@$IMAGEPATH$IMAGENAME.png" https://$DOMAIN/ | grep -Po '(?<="resource":")[^"]+')
|
-F "file=@$IMAGEPATH$IMAGENAME.png" "https://$DOMAIN/" | grep -Po '(?<="resource":")[^"]+')
|
||||||
echo $URL | xclip -sel clip
|
echo "$URL" | xclip -sel clip
|
||||||
|
|
||||||
rm $IMAGEPATH$IMAGENAME.png #Delete the image locally
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
rm "$IMAGEPATH$IMAGENAME.png" # Delete the image locally
|
||||||
|
Loading…
Reference in new issue