About links.cgi

This is the CGI program that administrates the link collection. It re-generates the page from a database, that the user can manipulate. The link collection itself is generated statically, so that no dynamic execution is necessary to just read the page. The database is encoded using Go's encoding/gob format, that makes it easy and efficient to load and dump the database to disk — given enough memory, which is not a concern nowadays. If you are also interested in using this approach, you can download the source and build a CGI executable for yourself. All you need to do after placing the executable in the right place is to set the password necessary to add links

./links.cgi passwd password

(Note that you really should call the executable links.cgi, that is currently unfortunately a hard-coded attribute that you would have to modify in the source code yourself)

You can then add new top-level nodes by adding ?add to the CGI URL. If you add a link without a URL, you just create a tree structure. Links may include commentary (formatted using Markdown), secondary source URLs and an arbitrary number of sub-nodes.

Note that the script is a best-effort attempt at doing what I need as simply as possible, but provided AS-IS and placed in the public domain. I make no guarantees w.r.t. forwards compatibility. That doesn't mean I am disinclined to help if you want to contact me. In fact I would be more than happy to help given my means.

Generating an Atom feed

The script can also generate an Atom feed of the newest links you added to the database. To enable it, you have to set some options:

./links.cgi set atom_file feed.xml
./links.cgi set atom_auth you@mail.tld

The atom_auth option is a authority name (needed for Atom IDs). It should denote some resource you are in control of, such as an Email address or a domain name.

Optionally you can also set atom_title and atom_size to set a title for your feed and the number of newest entries to cap respectively. By setting atom_xslt you can set a XSLT stylesheet to make the feed readable in a browser.

You can disable Atom feed by executing ./links.cgi unset atom_file.