┬─┐┬ ┬┌─┐┌┬┐┬ ┬┌─┐┌─┐┌─┐┌┬┐┌─┐ ├┬┘│ │└─┐ │ └┬┘├─┘├─┤└─┐ │ ├┤ ┴└─└─┘└─┘ ┴ ┴ ┴ ┴ ┴└─┘ ┴ └─┘ # Usage: AUTH_TOKEN= curl -H "Authorization: $AUTH_TOKEN" https://rp.exacer.be -F "file=@file.txt" # Functions rpaste() { local AUTH_TOKEN= local TYPE=file if [[ "$1" = "--oneshot" ]]; then TYPE="oneshot"; shift; fi curl -F "$TYPE=@$1" -H "Authorization: $AUTH_TOKEN" https://rp.exacer.be } rlist() { local AUTH_TOKEN= curl -s -H "Authorization: $AUTH_TOKEN" https://rp.exacer.be/list \ | jq -r '["url!size!expires (UTC)"], ["---!----!-------------"], ( .[] | [ "https://rp.exacer.be/" + .file_name, ( .file_size / 1024 | round | tostring) + " KiB", .expires_at_utc ] ) | @tsv' \ | tr '\t' '!' \ | column -t -s'!' \ | (echo; cat; echo) } rdelete () { local AUTH_TOKEN= for i in $*; do curl -H "Authorization: $AUTH_TOKEN" -X DELETE $i; done } # Doc: https://github.com/orhun/rustypaste?tab=readme-ov-file#cli