Jean-Etienne Poirrier made a very interesting entry in his blog about blog software. He made a small reference to a previous post on my old blog1 about the possible alternative or how to make a blog engine alternative for "technical people" like us. Jean-Etienne described an approach to store the entries per date. The date has the advantage to be a major "key" for sorting from a blog engine. I clearly subscribe to his point of view and propose (thanks Jean-Etienne for triggering me ;-) the following minimal approach using txt2tags. At a first stage, I really don't want to take care about the markup, its parsing and rendering. That's why I propose to use an existing console-based/vty document generator. Here is a potential "program flow" for this minimal blog engine when we want to generate the blog in XHTML :
gen-main.sh ./input ./published gen-rss.sh ./input ./published html-update.sh(modified) ./input ./published
gen-main.sh is a simple shell script taking all the t2t files from the input directory (where the blogs entries are) and generating another t2t for the main page (often the famous last entries and the blogroll). At the beginning, we could have a simple last 10 entries. gen-rss.sh do the same but also generating the RSS/RDF and ATOM files. The two programs could be one but two simple scripts could be better than a complex script (to be discussed). html-update.sh (already part of txt2tags (in extras dir)) is doing the conversion of all the t2t files to the target format (like XHTML) and could includes other t2t files (like footer and alike) or t2t macros.
So for updating the blog, an interface (Emacs,vim,email,Web,…) is putting an entry in the ./input directory. The only restriction is to write files in t2t files using date as a filename as described in Jean-Etienne's blog. For publishing the blog, you run the program flow described before and (maybe?) copy the published directory to your Internet hosted server using SSH.
If you have any ideas or comments, just let us know.
A small side note regarding the interface to update the blog, I already have a GTD page where I update this wiki via a simple email. For example, I'm discussing a project with a colleague and need to quickly remember an url, a ref or a todo. The colleague or I just send a mail to a define email alias 2 The source code to append an oddmuse page in a listed way via smtp is available here.
Another side note regarding the potential storage (instead of files with datetime format), the entries could be stored in an SCM (like Subversion or git) and using the different functions part of the SCM to create blog entries. But I think this is more complex than the simple datetime format approach.