Skip to content

Instantly share code, notes, and snippets.

@btbytes
Last active Mar 1, 2018
Embed
What would you like to do?
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