gmisub - Subscribe to Gemini pages

gmisub is an aggregator for Gemtext feeds formatted according to the

Subscribing to Gemini pages specification

It takes a list of Gemini URLs and extracts the feed entries. These are output to a file in order of date in a similar style to CAPCOM.

Example

Generated output

List of feeds used to generate output

Installation

Dependencies:




gmni

$ git clone https://git.sr.ht/~callum/gmisub
$ cd gmisub
$ make
# make install

Usage

Once you have it installed have a read of gmisub(1).

$ man 1 gmisub

As an example I use this script to aggregate the feeds listed in gmifeeds.gmi, include only the posts from the last month, and add a header to the start of the output.

#!/bin/sh
cd /srv/gemini/
OLDEST=$(date +%Y%m%d --date='1 month ago')
/usr/local/bin/gmisub -h gmisub-header.gmi -d $OLDEST gmifeeds.gmi gmisub-aggregate-new.gmi

if [ -s "gmisub-aggregate-new.gmi" ] 
then
	# file has data
	cp gmisub-aggregate-new.gmi gmisub-aggregate.gmi
else
	echo file is empty
fi

I also have this line in the gemini user's crontab which runs the script every 6 hours and saves logging information to a file.

0 */6 * * * /home/gemini/do-gmisub > ~/gmisub.log 2>&1

Source