Update catboxuploader
This commit is contained in:
@@ -18,13 +18,31 @@ esac
|
||||
|
||||
}
|
||||
|
||||
clip() {
|
||||
qdbus org.kde.klipper /klipper setClipboardContents "$(cat < /dev/stdin)"
|
||||
}
|
||||
|
||||
main(){
|
||||
|
||||
uploadtime
|
||||
|
||||
echo "uploading..."
|
||||
curl -F "reqtype=fileupload" -F "time=$time" -F "fileToUpload=@$filename" https://litterbox.catbox.moe/resources/internals/api.php
|
||||
curl -F "reqtype=fileupload" -F "time=$time" -F "fileToUpload=@$filename" https://litterbox.catbox.moe/resources/internals/api.php | clip
|
||||
|
||||
}
|
||||
|
||||
[ -z "$1" ] && echo -e "no file provided\nusage is catboxuploader yourfilehere\nsuch as: catboxuploader 123.txt" || main
|
||||
|
||||
|
||||
[ -z "$1" ] && {
|
||||
echo -e "no file provided\nusage is catboxuploader yourfilehere\nsuch as: catboxuploader 123.txt"
|
||||
exit 1
|
||||
}
|
||||
|
||||
|
||||
[ "$#" -gt 1 ] && {
|
||||
echo -e "error too many arguments\nonly 1 file may be uploaded at at time"
|
||||
exit 1
|
||||
}
|
||||
|
||||
|
||||
main && echo "uploaded"
|
||||
Reference in New Issue
Block a user