atom.awk : Generate an atom feed from plaintext blog posts

2022-05-09T12:45:44Z

TL;DR

mkdir site
cd site
mkdir blog
vi blog/entry1.txt
# write something, first line is title
date +'%Y-%m-%dT%TZ' > blog/entry1.txt.pubdate
$ find blog/ | awk -v domain="domain.tld" -v max=100 -v template=template.xml -f atom.awk > atom.xml

Description

Whether you write files in plaint text, markdown or any other markup language, you may want to create an atom feed.

That's actually what is proposed on shinobi.website.

You can even publish a whole blog only using ATOM feed.

This tool take a list of file as input and will generate an atom feed with the content of each fil as description.

No need for html escape or any conversion : it is plain text in a CDATA tag.

You can even write "<![CDATA[" in your pages, it will be escaped (not with shinobi.website's script for now, not sure how to reach the author to tell).

In order to include a file "blogentry.txt" in the feed, another file with the publication date must be next with the extension "blogentry.txt.pubdate". Date should be formatted '%Y-%m-%dT%TZ' (see strftime).

atom.awk is an awk script, available on most unix-like.

Download

=> atom.awk.tgz

Options

Example

$ find blog/ | awk -v domain="domain.tld" -v max=100 -v template=template.xml -f atom.awk > atom.xml

Now publish atom.xml file.

See also

=> https://shinobi.website/index.txt

Something to say

=> Any comment ? | See instructions about the mailing list

Proxy Information
Original URL
gemini://si3t.ch/log/2022-05-09-generate-atom-feed-from-any-plaintext.txt
Status Code
Success (20)
Meta
text/plain
Capsule Response Time
540.56682 milliseconds
Gemini-to-HTML Time
0.6327 milliseconds

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