Skip to content

Instantly share code, notes, and snippets.

@btbytes
Last active March 1, 2018 10:12
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save btbytes/6dccfb6de5d241c50641 to your computer and use it in GitHub Desktop.
Save btbytes/6dccfb6de5d241c50641 to your computer and use it in GitHub Desktop.
Script to upload a file to neocities.org
NEO_USER="user"
NEO_PASS="31d4e66b68e1ec3ed19d55abda7f81ef"

How to use neoup script:

  1. copy neoup script to your $PATH, say $HOME/bin
  2. chmod +x neoup
  3. copy .neocities to your $HOME directory
  4. edit .neocities to to have the your NEO_USER and NEO_PASS credentials.

To upload a file, say ~/tmp/ff.html:

neoup ~/tmp/ff.html
#!/bin/sh
fname=$(basename $1)
. ~/.neocities
curl -F $fname=@$1 https://$NEO_USER:$NEO_PASS@neocities.org/api/upload
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment