Answer the question
In order to leave comments, you need to log in
Is there a screenshoter with uploading to a third-party API?
Good time.
There was a need for an application for Windows that can take screenshots with the ability to upload it to a third-party image service API specified in it. On a Linux system, everything is much simpler, for this a script was written for subsequent unloading
#!/bin/bash
URL='http://service.ru'
NAME=`date '+%d-%m-%y-%N'`
DIR="/tmp"
FILE="$DIR/$NAME.jpg"
REMOVE=1 #Remove image after upload
function uploadImage {
curl -s -F "[email protected]$FILE" $URL/upload | grep -E -o $URL'[^"}]*'
}
scrot -s $FILE
uploadImage $FILE | xclip -selection c
if [ $REMOVE == 1 ]; then
rm $FILE
fi
notify-send -t 5000 -i dialog-information "Screenshot uploaded" "And copied from Clipboard"
Answer the question
In order to leave comments, you need to log in
ducklink.com/free-command-line-screen-capture.php + curl + small bat file + windows.microsoft.com/ru-ru/windows/create-keyboar...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question