Yet Another Gemini 2 Atom feed generator

Written by Wim Stockman - on 09 November 2024

An Awk script to generate an Atom feed for my Gemini server by parsing my root index.gmi

you find the awk script here:

=> gemini://yasendfile.org/projects/yagmi2atom/yagmi2atom.awk

Gmi based feed generator

The convention for blog/gemlog feeds seems to be Atom+XML, and looking round at the options for generating these i noticed it was easier to implement my own

Automatic feed generation

Since I'm a huge fan of Awk I choose this to parse my root index.gmi file to write out the Atom file

The way the script works.

I choose to skip the first 31 lines

NR < 32 {next;}

they are at the end of my index so if we find this exit.

/EXTERNAL/ {exit;}

the nice thing about awk , exit means: Stop processing and go to the END block. Not exist your script

The list of links are scanned,

/=>/ The link pattern

my links do have a structure, so first the link, then title with description and last update date in format "- dd mmm yyyy"

=> firstentrysecondpost.gmi My first article - 08 Nov 2024

These then get parsed and printed out in the right format.

the date formatting is also done in awk, that is a lovely nice hack.

Enjoy!

Proxy Information
Original URL
gemini://yasendfile.org/projects/yagmi2atom/index.gmi
Status Code
Success (20)
Meta
text/gemini; lang=en
Capsule Response Time
429.798481 milliseconds
Gemini-to-HTML Time
0.790218 milliseconds

This content has been proxied by September (3851b).