Skip to content

Instantly share code, notes, and snippets.

@shizmob
Last active July 5, 2018 14:08
Show Gist options
  • Save shizmob/7984374 to your computer and use it in GitHub Desktop.
Save shizmob/7984374 to your computer and use it in GitHub Desktop.
simple pomf uploader
#!/bin/sh
downpomf="https://a.pomf.cat/"
uppomf="https://pomf.cat/upload.php"
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 -fsSL "$@" "$uppomf" | jq -c -r --arg base "$downpomf" '$base + .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.
@ScoreUnder
Copy link

@parazyd pomf is dead. Has been for a long while. If it suits you I have a spiritual successor to this script: https://github.com/ScoreUnder/pomfclip

@shizmob
Copy link
Author

shizmob commented May 6, 2016

@parazyd @ScoreUnder I updated this script a bit a while ago, for what it's worth. Might be useful to any forks people maintain.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment