RSS feed for this website

So I realised that RSS is actually quite a good idea.

With this realisation I also decited to implement a RSS feed for this site. Turns out RSS is just a XML file send over the web. Why is this then in the 'ruby' section of this site? First, I want to generate two feeds, one with web links and one with gemini ones. Second, I also kinda don't want to deal with XML, so I made my own simpler syntax, as I do.

here is the script

So what does it do? I have a ~/rss file that it reads and translates to a proper XML file. Entries are separated by doubble newline and each line starts with a prefix coresponding to a XML tag. 'h' for <title>, 'l' for both <link> and <guid>, 'de' for <description> and 'dt' for <pubDate>.

~/rss file could look like this:

h RSS
l [HOME]/b-logs/ruby/rss:rss[EXT]
de implementation of this RSS feed
dt Sun, 25 Aug 2024 06:29:18 CDT

h I finished ptts!
l [HOME]/b-logs/crystal/ptts/070:DONE![EXT]
de after over 4 months of work, I finished my typeseter for the terminal and pdf
dt Sun, 24 Aug 2024 09:59:23 CDT

Note the capitalised words in square brackets. Those are replaced to allow for generating links to both web and gemini. They are:

RSS requires date in specific format that cen be obtained via the following command:

date '+%a, %d %b %Y %X %Z'

That's it. RSS is very simple.