First post at new site
It’s finally done. Some days ago I decided I would migrate my blog from wordpress.com to my own personal web space, provided by fastmail.fm. This would give me more control over the final look of the blog without spending more money, as FastMail was already handling all my email for the domain rg3.name.
In the beginning I wanted to create a simple blog generator in Python that would take a handful of templates and generate the blog contents from them and posts written in AsciiDoc, one post per file on disk. The final system I’ve implemented follows that, but it took more lines of code than expected (and a few more days too) because I was too ambitious coding some parts of the system, and now I feel I should start over and do it again way better. :)
Anyway, in the mean time the current system works just as intended, and the blog looks more or less like I had in mind when I started, after tuning the CSS stylesheet again and again. The only really dynamic part of the blog are the comments and they are handled by Disqus.
Exporting the old content out of wordpress took its time too and involved a good amount of manual fine-tuning and editing, but the biggest part of the job was easy because wordpress lets you export the blog content as an XML file. A few lines of Python and using Pandoc allowed me to split the wordpress XML into multiple AsciiDoc post files. While Pandoc made a few mistakes converting the quasi-HTML content from wordpress to AsciiDoc, I have to say it’s an amazing tool that should be in your bookmarks.
It’s written in Haskell and I didn’t have anything set up for it in my Slackware installation, so I had to:
-
Install GHC 7.4.1 using the binary distribution.
-
Build and install Haskell-Platform 2012.02 on top of it.
-
Finally install Pandoc using the "cabal" Haskell package manager.
Overall I’m very satisfied with the result and I hope to be making more use of this new space soon.