Sören Bleikertz
22 Dec 2009

Salmari Blog Software

This blog is generated using a Python script from text files residing in a subversion repository. I have uploaded the script (called Salmari) on github and will give some comments on the software in this post.

The motivation behind not using wordpress, blogger et al. is very well explained in this blog post by the creator of a similar blog software called Jekyll. Basically I want to have a static blog, so no PHP/Ruby on Rails etc; I want to write my posts in a proper editor, e.g. vim or emacs; and I want to have my posts in a version controlling repository, which allows me to iteratively write posts. The main reason of not using Jekyll and instead writing my own is simple: because I can and it’s fun!

Salmari is using a subversion repository as a backend, which stores blog posts written in the Textile markup language. I know that subversion is so 2007ish and everybody is using git nowadays, but Python has a good subversion library to directly operate on the repository instead of working copies and I was more familiar with subversion when I started this project. Blog posts are written in the Textile markup language, which is powerful enough for my posts, and are translated to HTML with pytextile and mako templates triggered by a post-commit script. Salmari discovers the changed (added, deleted, modified) files for the given revision and only operates on these.

A feature I added recently is the possibility to embed code in blog posts, which is automatically uploaded to github’s gist and the gist is embedded in the translated version of the post. With github’s gist the code is automatically syntax colored, version controlled, and forkable on github.

The follow-up project of this is to look into implementing a similiar functionality using git as a backend and written in Haskell. More on this at a later point.