Printf instead of echo

pull/73/head
Charlie 3 years ago committed by GitHub
parent 904ea26fcd
commit 8031758fcb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -2,7 +2,7 @@
IMAGEPATH="$HOME/Pictures/" # Where to store screenshots before they're 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="" # Your ass upload token KEY="" # Your ass upload token
DOMAIN="" # Your upload domain DOMAIN="" # Your upload domain (http(s))
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
@ -14,6 +14,6 @@ URL=$(curl -X POST \
-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 printf "$URL" | xclip -sel clip
rm "$IMAGEPATH$IMAGENAME.png" # Delete the image locally rm "$IMAGEPATH$IMAGENAME.png" # Delete the image locally

Loading…
Cancel
Save