Compare commits

...

3 Commits

Author SHA1 Message Date
Jack L. Frost 19f6c5249a remove debug stuff
Signed-off-by: fbt <fbt@fleshless.org>
2022-12-28 04:19:58 +00:00
Jack L. Frost 823a2847c8 encode all the stuff
Signed-off-by: fbt <fbt@fleshless.org>
2022-12-28 04:16:26 +00:00
Jack L. Frost 6e2c506e72 alignment
Signed-off-by: fbt <fbt@fleshless.org>
2022-04-18 10:25:48 +00:00
1 changed files with 10 additions and 4 deletions

14
ufw
View File

@ -43,7 +43,7 @@ usage() {
-t|--tags "<tag1[, tag2,..]>" # Add tags to the file.
-q|--quiet # Be quiet.
-v|--void # Don't add the file to my files.
-c|--clipboard # Throw the result into the clipboard
-c|--clipboard # Throw the result into the clipboard
Config options (~/.config/ufw):
secret # Your personal token. Get it at https://zfh.so/settings_form
@ -84,7 +84,10 @@ get_max_filesize() {
get_album_id() {
declare api_response api_status api_status_message
api_response=$( curl -f "$cfg_service_url/albumctl.json?m=new&name=$1&secret=$secret" )
api_response=$( curl --get \
--data-urlencode "name=$1" \
--data-urlencode "secret=$secret" \
"$cfg_service_url/albumctl.json?m=new" )
get_api_status <<< "$api_response"
@ -188,7 +191,10 @@ upload() {
get_shortlink() {
declare url=$1 api_response api_status api_status_message
api_response=$( curl "$cfg_service_url/shrink.json?url=${url}&secret=$secret" )
api_response=$( curl --data-urlencode "url=$url" \
--data-urlencode "secret=$secret" \
"$cfg_service_url/shrink.json" )
get_api_status <<< "$api_response"
if (( api_status == 200 )); then
@ -444,7 +450,7 @@ main() {
get_token || return $?
for t in "${args[@]}"; do
get_shortlink "$1"
get_shortlink "$t"
done
;;