Writing An RSS Feed Generator
RSS is just a big string. You can write an RSS feed using print
or
its equivalent in your language.
Andrew's RSS feed generator is the second one I've written. The first, neatly, was for Hacker News (not the official one or anything, just one I wrote).
The format's simple enough. There's a standard header:
<?xml version="1.0"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
At the bottom of the whole kit and kaboodle is a closer for the channel element:
</channel>
In between there's a whole lot of elements called items. They can have a lot of elements inside. I kept it simple this time:
<title>%s</title>\n"+
"\t<link>%s</link>\n"+
"\t<description>%s</description>\n"+
"\t<generator>Andrew</generator>
I wish there was more to tell you, but there really isn't. Just remember: it looks jenky, but https://www.rssboard.org/rss-specification really is the spec.