From Textile to Markdown

You probably remember by now my blog’s woes with the piece of crap that goes for a blog engine I’m using right now. Since enough people asked me to please not kill the blog, and since I would like, if I keep the blog around, to keep it up to date (if it were to go stale forever I would proceed with my idea of killing it altogether, and maybe make a book out of it), I’m looking in what options I got.

The options for me are either to move to a different blog engine altogether, or to just cut features out of the currently-running version of Typo to remove the errors and the stuff I don’t need. Please do not try to suggest me to use a static generator as I don’t care about it: I want to be able to edit my blog online, and I want to be able to have comments. And I’m not going to maintain two different pieces of software to maintain a static engine and a comment system, and no I’m not going to use Disqus or similar. Full stop.

Whichever way it goes, one thing that I need to change is the text format the posts are written in. Right now most of it is written in Textile. I’m not sure if the choice was simply due to Markdown sucking at the time, or this being the format used by Serendipity that I was using before. In any case, Textile lost the text format war and everything is Markdown nowadays. So I changed the settings for the new posts and I’m writing them in Markdown. The problem is converting the old posts.

Now thankfully I’ve already been pointed at pandoc which is a great tool… but its support for Textile, like most platforms, is not really perfect. For instance, lists are not properly converted; bullet lists are only evaluated correctly if the line does not start with a space (even though the Ruby gem for Textile supports it starting with space), and image URLs, which are expressed between exclamation marks, are matched across lines, making a mess of posts where more than one exclamation mark is present.

I can probably work those two issues around during the conversion (I already have a script that can pass all the posts through pandoc to convert them to Markdown), but there are bound to be more issues.. which means I’ll have to go through all my posts (or most of them at least) to make sure that my posts have been converted correctly. Is anybody with a liking for Haskell willing to fix these smaller issues for me?

Hopefully, I’ll soon be able to stop relying on Textile, and the multiple text filters are going to be the first thing I get rid of in Typo, as their execution requires database access for no good reason…

5 thoughts on “From Textile to Markdown

  1. Out of curiosity… which blog engines, if any, did you consider?P.S. your home page links to non-https content and some part of it are blocked by newer versions of firefox, for example the style sheet is not loaded

    Like

  2. I’ve been considering Mezzanine, and I might re-consider JRoller, which I tried years ago and then discarded among others because of a lack of support for Textile.As for the homepage… that sounds wrong. Chrome has been blocking non-secure content for a long time before Firefox and it reports no problem of sorts, I’ll have to check with Firefox but it looks like it might be a bug for them, I’m pretty sure I dropped all non-HTTPS content…

    Like

  3. It surprises me you’re not even slightly annoyed about these idiotic browser woes. It’s like we’re accepting the issues we had with IE6 but accept it now because it’s not IE6.

    Like

  4. Well, the HTTP-on-HTTPS-page is a perfectly valid situation where to break. I think I found what the problem is, it’s the Flattr script on my website not working as intended, will fix it properly in a moment…

    Like

  5. You could just take the easy route and convert textile to HTML (which as this site shows already works).Since HTML is valid markdown, you can then just plug it in.What you lose, though, is the nice syntax in case you want to change an old post.

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s