From 8203a7ef46ea3f9e098629090a86c1bd626abf3d Mon Sep 17 00:00:00 2001 From: Alice Gaudon Date: Mon, 22 Apr 2019 20:30:22 +0200 Subject: [PATCH] Add script folder --- scripts/flameshot_upload.sh | 21 +++++++++++++++++++++ scripts/flameshot_upload_latest.sh | 20 ++++++++++++++++++++ 2 files changed, 41 insertions(+) create mode 100755 scripts/flameshot_upload.sh create mode 100755 scripts/flameshot_upload_latest.sh diff --git a/scripts/flameshot_upload.sh b/scripts/flameshot_upload.sh new file mode 100755 index 0000000..232dbc3 --- /dev/null +++ b/scripts/flameshot_upload.sh @@ -0,0 +1,21 @@ +#!/bin/sh + +file_name=$(echo ~/Pictures/Screenshots/) +base_name=$(date +%F_%H-%M-%S) +base_name+=".png" + +file_name+=$base_name + +flameshot gui -r > $file_name + +sftp -oPort=4242 gaudonpr@ftp.gaudon.pro << EOT +cd public_html/push.arisu.fr/ +put $file_name +EOT + +url="https://push.arisu.fr/" +url+=$base_name + +echo $url | xclip -selection clipboard + +notify-send "File upload complete" "$url" --icon=flameshot.svg diff --git a/scripts/flameshot_upload_latest.sh b/scripts/flameshot_upload_latest.sh new file mode 100755 index 0000000..acd96a3 --- /dev/null +++ b/scripts/flameshot_upload_latest.sh @@ -0,0 +1,20 @@ +#!/bin/sh + +latest_screenshot=$(ls -t ~/Pictures/Screenshots/ | head -1) + +file_name=$(echo ~/Pictures/Screenshots/) +base_name=$latest_screenshot + +file_name+=$base_name + +sftp -oPort=4242 gaudonpr@ftp.gaudon.pro << EOT +cd public_html/push.arisu.fr/ +put $file_name +EOT + +url="https://push.arisu.fr/" +url+=$base_name + +echo $url | xclip -selection clipboard + +notify-send "File upload complete" "$url" --icon=flameshot.svg