nci is a webscript for Neocities that lets you easily post, delete and modify blog entries and update files from your GNU/Linux terminal.

nokoru d808efe2e9 modify 2 days ago
templates b3cef6cece add template usage instructions 1 month ago
.gitignore 00db41278f let user change the text editor 1 month ago 43009a9a5c minor change 1 month ago
COPYING 8de73728bb change license to unlicense 4 days ago d808efe2e9 modify 2 days ago 782d9aac44 minor changes 4 weeks ago 782d9aac44 minor changes 4 weeks ago
del 7ec338cf70 correct/improve syntax 1 month ago
destroy ba256f70c5 add destroy file 2 weeks ago
help a5a53c04a5 change license 4 days ago
init ac08b788d0 add full support for reconfiguration 1 month ago
list 7a6a30f299 initial commit 2 months ago 7a6a30f299 initial commit 2 months ago e75f40a09c correct markdown command 1 month ago
mod c6fbfbd3a3 minor correction 1 month ago 9f427056c5 fix uploading bugs 1 month ago
new 00db41278f let user change the text editor 1 month ago
push 9f427056c5 fix uploading bugs 1 month ago
refresh 7a6a30f299 initial commit 2 months ago deb058b056 fix minor bug 1 month ago

nci webscript

nci is a webscript for Neocities written in bash and python that lets you easily post, delete and modify blog entries and update files from your Linux terminal. I created this webscript to create and manage my neocities blog, so nci is just a hobby project and might not be a very good program. I just wanted to share the nci engine for fun and helping people, so adapt the scripts to your needs or just try it!

you want to install it? OK! just remember I'm not responsible for any damages you do to your website caused by the misuse of nci.

How it works

nci works in a specific directory that contains the scripts of the nci system. Basically you cd your_neocities_website_directory and then you run nci commands inside of it to update your website files or blog entries, if you've used git, the behavior is pretty similar.



Dependencies are python 3.x.x, curl, pip and the pip markdown module. Additionally, you need git to clone the nci repo, so install all the required packages before using nci. If you're using Debian, Ubuntu, Mint or any Debian-based distro, then run:

  1. sudo apt install python3 python3-pip curl git
  2. pip3 install markdown

If you're using any other distro, then use your corresponding commands in order to install the nci dependencies.

nci installation

  1. Clone the nci repo git clone
  2. Rename the nci directory if you want (i.e. "my_website") mv nci <your_website_directory>
  3. Select the directory cd <your_website_directory>
  4. Run ./init to initialize the nci system.
  5. Congrats! You can now create, modify and delete blog entries! See "how to use nci" for details

How to use nci

The basics

Once you installed nci, you'll see your website directory has now two main folders: "public_html" and "entries". Those folders contain your blog data and website files.

  • public_html: this is your main website folder, it contains your documents and files: html pages, images, rss feed, css styles, javascript, etc.
  • entries: contains your "raw" blog entries, this directory is vital for the nci system!

Additionally, you'll find your website directory has a file named "nci.conf". Don't delete it! (actually, don't delete anything that the ./init script generates)

How to post blog entries

  1. Run ./new
  2. Type a title for your entry.
  3. Your preferred text editor (by default: GNU Nano) will be opened, it'll display a "form" that looks like this:
<start writing your thoughts and feelings here>
  1. Just write whatever you like BELOW the BODY: line, don't type anything next to "BODY:".
  2. You can use markdown to format your article body if you want (nci will parse the markdown and then convert it into html)
  3. If you add any image to your entry, you must move your image to the "public_html/" directory!
  4. Once you finished your entry, just save the file and close your text editor (for GNU Nano: ctrl+s to save, ctrl+x to exit).
  5. To add your created entry to your blog HTML and RSS, run ./refresh

The ./refresh command

The ./refresh command is really important, cause by using that command you can, well, "refresh"/rewrite your blog HTML and RSS files, when you "refresh" your blog, you're applying changes like adding created entries, removing deleted ones and updating the content of the entries you modified.

Other commands

Run ./help to see a list of useful commands like ./del or ./mod.

Uploading my nci website/blog to Neocities (./push)

Run the ./push command to upload your website files ("public_html/*"). WARNING: If you already have a Neocities website, then download it (from your Neocities dashboard) and paste all the files inside the "public_html/" directory! ANY file that is not found inside the public_html directory will be deleted!

license and credits crap

nci was originally licensed under the WTFPL, but I want my projects to be formally in the public domain without caring about lack of warranty disclaimers or crap like that. I don't like license agreements, unfortunately laws force people who's against selfishness that are copyright laws to license their works in some way, so nci is now licensed under the Unlicense (basically public domain). You can do whatever you like with nci. No rights reserved (see COPYING file if you want to read the Unlicense legal crap).