» · 3.5 · 3.5img · lab8 · ok · qrstuv · sl · subversive

site map

Is this werc?

nein, this is

nein is a static website generator written in ksh, inspired by werc. It has no other dependencies. I didn't actually read werc code, I just plagiarazed how it looks.

The Database

Made of local directories. Each directory may or may not have the file index in it. If it does, then that file is parsed as index.html in the destination path. If index does not exist, list of immediate subdirectories is generated instead.

index files are written in plain html.

example of a local database

(see example-db.tgz $db directory)

%find . -type d
.
./openbsd
./freebsd
./freebsd/custom-keymap
./freebsd/custom-keymap/cs-keymap
./freebsd/format-hdd
./9front
./log
./ksh
./werc
./hardware
./nein
./art
./art/colors
./art/pmjv-prahou
./art/pmjv-prahou/mono
./art/trojsil
./useful
./useful/awk
./useful/curl
...
%cat 9front/index 
<h1>9front</h1>
<a href="//9front.org"><p><img src="img/thistimedefinitely.front.png" alt="this time definitely"></p></a>

Code

The rest is made up of two programs, neintree and nein.

neintree

A path is provided as an argument to neintree. It loops through the directories of the path and generates the tree-menus accordingly.

nein

It loops through all subdirectories in the database and sends index files to their desired destination as parsed .html documents.

Place nein and neintree in ~/bin, or wherever in $PATH, edit nein and change variables at the top: $db and $wroot. db is the local database, wroot is the website. Put something in $db. run nein.

Caveats

urls are hardlinked with /directory/subdirectory. This means wroot has to be the root directory of the website.

Download

nein.tgz

Author

nein

License

nein

2025+