nci is a webscript for Neocities users that lets you easily create and manage a blog from your GNU/Linux terminal. nci provides you basic utilities like creating, modifying and removing entries.
nokoru dd42312294 change README.md | 4 år sedan | |
---|---|---|
templates | 4 år sedan | |
.gitignore | 5 år sedan | |
CONTRIBUTING.md | 5 år sedan | |
COPYING | 5 år sedan | |
README.md | 4 år sedan | |
check_deletion.py | 5 år sedan | |
check_upload.py | 5 år sedan | |
del | 5 år sedan | |
destroy | 4 år sedan | |
exclude | 4 år sedan | |
help | 4 år sedan | |
init | 4 år sedan | |
list | 5 år sedan | |
list.py | 4 år sedan | |
markup.py | 5 år sedan | |
mod | 5 år sedan | |
neocities_files.py | 5 år sedan | |
new | 5 år sedan | |
push | 5 år sedan | |
refresh | 5 år sedan | |
refresh.py | 4 år sedan |
nci is a webscript for Neocities written using the posix shell and python. It 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.
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 way it works 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:
sudo apt install python3 python3-pip curl git
pip3 install markdown
If you're using any other distro, then use your corresponding commands in order to install the nci dependencies.
git clone https://notabug.org/nokoru/nci.git
mv nci <your_website_directory>
cd <your_website_directory>
./init
to initialize the nci system.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.
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)
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:
TITLE:<your_entry_title>
DATE:<today>
BODY:
<start writing your thoughts and feelings here>
4) Just write whatever you like BELOW the BODY:
line, don't type anything next to "BODY:".
5) You can use markdown to format your article body if you want (nci will parse the markdown and then convert it into html)
6) If you add any image to your entry, you must move your image to the "public_html/" directory!
7) 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).
8) To add your created entry to your blog HTML and RSS, run ./refresh
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.
Run ./help
to see a list of useful commands like ./del
or ./mod
.
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!
nci is licensed under the Unlicense license (basically public domain). Do whatever you like with nci. You don't have to credit me or asking me for permission to do anything, just do what you want. Keep in mind that nci comes with no warranty.