basiscraft: RSS Feeds for Org Files
Table of Contents
1 ORG -> RSS
This note describes a method for generating an RSS feed from a single "org mode" file. Read the section Background About Org if you are unfamiliar with the Emacs outline editor called "org mode".
1.1 One File == One Channel
Each org mod file is its own RSS channel.
| org-mode metadata | RSS Channel element | notes | implemented? |
|---|---|---|---|
| #+TITLE: | title | n | |
| #+DESCRIPTION: | description | n | |
| link | provided externally | n | |
| #+LANGUAGE | langauge | n | |
| #+COPYRIGHT | copyright | n | |
| #+EDITOR | managingEditor | n | |
| #+ADMIN | webMaster | n | |
| #+PUBDATE | pubDate | n | |
| lastBuildDate | automatically generated | n | |
| #+CATEGORY | category | only one per file | n |
| #+GENERATOR | generator | n | |
| docs | "http:www.rssboard …" | n | |
| cloud | provided externally | n | |
| ttl | provided externally | n | |
| image | provided externally | n | |
| rating | not yet supported | n | |
| textInput | not yet supported | n | |
| skipHours | provided externally | n | |
| skipDays | provided externally | n |
1.2 The File is an Item
Every org file RSS feed has at least one item and that item stands for the whole file itself.
| org-mode metadata | RSS Channel element | notes | implemented? |
|---|---|---|---|
| #+TITLE: | title | same as channel | n |
| #+LINK: | link | defaults to same as guid | n |
| #+DESCRIPTION: | description | same as channel | n |
| #+AUTHOR | author | n | |
| #+KEYWORDS | category | n | |
| comments | provided externally | n | |
| #+UID | unique id within project tree | n | |
| guid | generated with help from #+UID | n | |
| ??? | enclosure | ??? | n TODO |
| #+PUBDATE | pubdate | n | |
| source | provided externally | n |
1.3 Files Can Contain Additional Items
The org file as a whole is an "item" but, in addition to that, individual sections of the outline can themselves be items.
This is done using node properties.
| org-mode metadata | RSS Channel element | notes | implemented? |
|---|---|---|---|
| :TITLE: | title | defaults to node heading | n |
| :LINK: | link | defaults to guid | n |
| :DESCRIPTION: | description | n | |
| :AUTHOR: | author | defaults to file author | n |
| :KEYWORDS: | category | defaults to file keywords | n |
| comments | provided externally | n | |
| :ID: | unique id within file | n | |
| guid | generated with help from #+UID and :ID: | n | |
| ??? | enclosure | ??? | n TODO |
| :PUBDATE: | pubdate | n | |
| source | provided externally | n |
1.4 Background About Org
"org mode" is an outline editor for GNU Emacs.
GNU Emacs has had a fancy outline editor for text-based outlines since, pretty much, forever. The very earliest releases of Gnu emacs included an outline editor. That's because versions of Emacs that came long before GNU Emacs had outline editors. And the reason why all those Emacsen have had outline editors is because outline editors are pretty cool and useful.
For roughly two decades the GNU Emacs outline editor was kind of frozen in time. It was the GNU Emacs "cover song" of Emacs-ish outline editors from the 1970s and early 1980s. It was fine for what it did but what it did was not much and it wasn't very interesting. Oh, sure, I'd use it from time to time but it wasn't really all that exciting.
Then some wise guy (Carsten Dominik) decided to write org mode. Org mode is way, way more featureful than traditional outline mode. For example, it can do things like symbolic differentiation of algebraic equations. Sure, sure, that's something one generally expects of any decent outline editor but… in an Emacs outline editor? That's pretty swank. More seriously, it does all kinds of linking, and tables, and so forth.
Org is nicely done. Somehow, for all of its fanciness, org mode neverthless manages to maintain the spirit and simplicity of an emacs-based, text-based outline editor. Basically, it's like an IDE for WIKI-ish syntax for outlines with tables and lists and links etc. Who could ask for more or settle for less?
If you have a whole directory tree full of "org mode" outlines, one of the things that org mode can do is "export" all of them to HTML. So, as outline editors go, org mode is a pretty nice CMS for static web sites!
Org version 7.5 with Emacs version 22
Validate XHTML 1.0