An email digest generator for Gemini, supporting gmi and Atom formats, written in Nim.
Updated readme with aspiration to fix up data layer
Fixes for findings from jns
Added sample templates

heads

tip
browse log

clone

read-only
https://hg.sr.ht/~sunset/static
read/write
ssh://hg@hg.sr.ht/~sunset/static
Static is a tool that polls Gemlogs - in convention-based or Atom formats -
and sends out email digests of their contents. It's written in Nim and uses
SQlite for data storage.

The code is small but could definitely be smaller. At some point a
macro-oriented rewrite of static_server and static_cli is on my radar. Other
things I plan to address --

 - Unit tests.
 - Reference service files for systemd, OpenRC, and probably sysvinit.
 - RSS.
 - A bunch of general housekeeping stuff. There are areas where my lack of
   familiarity with Nim shows. This has been a "learn Nim" project and there
   is most definitely room to improve.
 - Changes to how ingests are managed. I'd like to take a smarter approach to
   this than "hash all the URLs we eat, forever." (There's not even an
   especially good reason to be hashing them in the current manner to begin
   with.)
 - Multithreading, especially in feed polling.
 - Make static_data less irregular!

This can be compiled with

   nim build

and will generate three binaries in the bin directory.

static

   This is the batch processor. Pulls the feeds, compares them against
   the already-ingested hashes for that feed, generates an email with
   a digest of any new posts, then terminates. Takes a configuration path
   as a command-line param; if not given one, defaults to static.conf in
   the working directory.


static-cli

   The command-line tool for managing the Static instance. It doesn't
   need the full set of configuration keys, so it just takes a path to
   the SQlite database as a parameter. "static-cli help" describes the
   available parameters and their syntax.

static-server

   The frontend Gemini daemon. Like static, it takes a path to a config
   file as a param, or defaults to static.conf.

There's a sample static.conf included in the source distribution. This
is a JSON config file, and the keys should generally be
self-explanatory, but will be better documented in a future version.

The Static database can be generated with dbinit.sql in the scripts/
directory.