2024-08-10 An offline reader using NNCP

The NNCP manual suggests using `rss2email` to read feeds offline, via NNCP. And why not! Email is great. Email via NNCP works.

The NNCP manual

Email via NNCP

Yesterday, however, I wondered about a program that would use NNCP directly to pull new (Markdown) files. Such a "site" wouldn't have to be on the web. It wouldn't need a feed. It would act like a blog because new files are requested as they are published. They are published by being linked to from some sort of index. In my case, for example, index.md would be the "blog view" of the site (you'd only get new pages as they are published) and changes.md would be the "wiki view" of the site (you'd get updates if the page changes). Request this file on a regular bases, then request every file linked to from those pages (unless you already have a copy).

index.md

changes.md

I've scripted this all using a bit of Perl. Sadly, installation is not trivial because there's no Perl module to turn HJSON into JSON, so I'm calling the `hjson-cli` programm which you have to install, too. Sorry!

To install the Perl modules, use CPAN:

cpan JSON
cpan CommonMark

To install `hjson-cli` if you have Go installed:

go install github.com/hjson/hjson-go/v4/hjson-cli@latest

Ideally, I'd write a `JSON::HJSON` module, package it all for CPAN, and then you'd install it using `cpan NNCP::Pull` or something like that.

​#NNCP