Skip to content

Instantly share code, notes, and snippets.

@syndrill
Forked from shizmob/pomfload
Last active February 25, 2020 20:39
Show Gist options
  • Save syndrill/f778264ca928f3752cfd10fb7f5d08fc to your computer and use it in GitHub Desktop.
Save syndrill/f778264ca928f3752cfd10fb7f5d08fc to your computer and use it in GitHub Desktop.
simple pomf (lolisafe) uploader
#!/bin/sh
downpomf="https://a.safe.moe/"
uppomf="https://safe.moe/api/upload"
token="CHANGE_TOKEN"
if test $# -lt 1 ; then
echo "Usage: `basename $0` FILE [FILE...]"
exit 1
fi
set=
for f ; do
test "$set" || set -- ; set=1
set -- "$@" -F "files[]=@$f"
done
curl -H "token: $token" -fsSL "$@" "$uppomf" | jq -r '.files[].url'

pomfload - upload to pomf from the comfort of your command line

usage: pomfload FILE [FILE [FILE...]]

what are you, stupid?

requirements

  • POSIX-compatible shell
  • curl
  • jq

license

        DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE 
                    Version 2, December 2004 

 Copyright (C) 2004 Sam Hocevar <sam@hocevar.net> 

 Everyone is permitted to copy and distribute verbatim or modified 
 copies of this license document, and changing it is allowed as long 
 as the name is changed. 

            DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE 
   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 

  0. You just DO WHAT THE FUCK YOU WANT TO.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment