~pkal/llist

A private link aggregator
Modernize codebase
73fe25b8 — Philip K 4 years ago
Fixed redirection after commenting
81e5c249 — Philip K 4 years ago
Reworked users comment list

refs

master
browse  log 

clone

read-only
https://git.sr.ht/~pkal/llist
read/write
git@git.sr.ht:~pkal/llist

You can also use your local clone with git send-email.

#llist

llist is a simple and stupid HN/lobste.rs clone, without voting, written in Golang. It's published under a 2-clause BSD, see LICENSE.

#Build

After downloading the source, run

go get
go build

in the source directory. go get will download the Go SQL driver for Sqlite and the Go Libravatar library. After go build is run, a llist binary will appear in the working directory.

#User file

The user file lists all users, their hashed password, their email address and a short description. Each entry is in it's own line, and each section is separated by semicolons (:). The hashed password is the result of applying sha256 to a string containing the username, a semicolon and the password (eg. john:sEkr3t).

To easily add new entires to the user file, use the add_user.sh shell script. $USERF (see below) has to be specified for this to work.

#Use

llist can either be run as a standalone binary, as a cgi- or a fcgi executable. The latter two options are enabled by letting the binary file end with .cgi and .fcgi respectively.

Users can now submit links and comment on them. To deactivate commenting, one has to change to $users variable from true (default) to false in list.gtml.

It is generally recommended to tweak the templates to fit the specific needs of the situation, either in regards to styling or template variables.

#Environmental variables

  • PORT: Specified port to listen on when run as a standalone binary. Will fail if empty.
  • GTML: Sets template directory, defaults to ./gtml/.
  • USERF: Tells llist where to look for user file, defaults to /etc/llist_users.