haqistan

aboutcontactdonatelicensearchives

About haqistan

Hi, I’m Attila. I write stuff on occasion, mostly when I’m not hacking or dealing with The Dogs.

This site is 100% static content. There are no interactive features or server-side software other than the HTTP daemon that serves the static content. You do not need JavaScript enabled to view anything here.

If you feel the need to comment on something here in public, there are a lot of ways you can do that elsewhere now. If you want to comment to me about something directly see the Contact page for how to reach me.

Previous Incarnations

In the past I ran a WordPress instance and used it to rant and rave about whatever: politics, economics, lots of pointers to outrageous things on the web, etc. It was called “thisland” as a reference to the famously-canceled TV show Firefly. The blog never had anything to do with Firefly, I just thought the “this land” bit was funny. If you got here from an old thisland.haqistan.net link, that’s why.

Then I switched to Trac and its blog plugin, but managing the Trac instance has proven irritating for a number of reasons and I found myself increasingly avoiding doing things with it.

Running WordPress and Trac for a while convinced me I don’t want that stuff installed on my servers, and furthermore it isn’t necessary: I just want a static site and I refuse to jump down the let’s write a content management system while pretending that we’re not rabbit hole again (I still have water in my ears from the last time).

I’ve come to the conclusion that I’d prefer to manage my site as plain text. MultiMarkdown is, for me, the perfect blend of simplicity and power in this regard: enough of an improvement over plain old markdown that it’s worth using but not so strange or different that it isn’t easy to share and work with other people. It is also simple to turn the same source document into either HTML or PDF (via LaTeX). The results are fairly pleasing. It’s amazing how much you can do with simple materials.

A Bit of Perl

This site is fundamentally fueled by MultiMarkdown. The final MultiMarkdown files are generated, lightly, by a Perl script named flog.pl (driven by a BSD Makefile, which does have a tiny bit of skulduggery in it). The posts and pages are written in MultiMarkdown and the Perl script analyzes and modifies them slightly on their way into the final directory structure for the blog. It also generates all of the indexes, archives, etc. in MultiMarkdown. All styling is via plain old CSS with no external dependencies. The flog POD has more information for the morbidly curious.

MultiMarkdown’s metadata facilities are more than enough to deal with anything blogient: tags, dates, titles, etc. This was one of the key additions multimarkdown made to markdown and I think it is an important one. You can see what use I make of MultiMarkdown by looking at any of the source files to the HTML on this site. I leave the source files in the web tree, since it causes no harm and may be of interest to someone. For instance, the source file for this page is about.md; note that this is the MultiMarkdown file that flot generated from an input file. The file inclusions and other obvious boilerplate is added by Flog on the way to the docroot. The same pattern holds everywhere, with tiny exceptions here and there. For instance, posts get summaries generated for them and tacked on as head matter, while static pages only get an “Updated on …” timestamp added at the bottom.

To resurrect some of my old WordPress posts I wrote another Perl script named dump_wordpress.pl to suck the juice out of a restored dump of my old WordPress MySQL database. Maybe someone who has to do something similar will find it interesting, since it handles tags (turned out to be tricky). It turns a MySQL database made by WordPress into a directory full of MultiMarkdown files.

I will not allow flog.pl to grow into some content-management monster. I don’t want this to become an all-singing, all-dancing answer for everything. I don’t think I’ll even release it other than by pointing to it on this page. It has a BSD license, as does dump_wordpress.pl. Maybe one or both of them will be useful to someone else. If you try to use either, drop me a line, I’d love to hear about it.

Updated on 2017–06–13


Copyright © 1999–2017 by attila <attila@stalphonsos.com>. All Rights Reserved.