Blogging with Emacs and Haskell, part Zero

Since I started using WordPress to host my blog, I’ve generally been fairly pleased with it. Its killer feature has to be Akismet, the built-in spam filter. Akismet has so far killed over 18,000 spam comments for me, or roughly 300 per day in the two months since I switched from Blosxom to WordPress. Perhaps one in fifty spam comments make it through Akismet’s filters, at which point they’re easily dealt with via the web interface. So Akismet makes the difference between manageable comments and having to turn them off entirely.

One substantial aspect of WordPress that I’ve been displeased with is, surprisingly, its support for writing articles. The “WYSIWYG” JavaScript editor repeatedly loses my formatting, and is slow and unresponsive besides. The “plain” editing interface isn’t much better for me; I like to put code snippets in my blog entries, and it doesn’t deal well with these. And the internal text formatting flow is baroque.

Fortunately, WordPress provides a remote API via XML-RPC, so it’s possible to avoid its authoring interface entirely. My goal is to be able to write something like plain text from within Emacs, and have it turn into a nicely formatted blog posting with a minimum of fuss.

To this end, I spent a couple of hours putting together a small “blog helper” in Haskell. It uses John Gruber’s Markdown tool to turn plain text or literate Haskell source into a blog entry, and uses WordPress’s XML-RPC interface to publish it for me.

I’m writing this article as a Markdown-formatted file within Emacs, and publishing it with a few keystrokes. Excellent! Over the next few articles, I’ll detail how I did this.

Posted in haskell, web
6 comments on “Blogging with Emacs and Haskell, part Zero
  1. Ramūnas says:

    There is Haskell library/tool for makrdown conversion, it might be esier to use from Haskell program:

    http://sophos.berkeley.edu/macfarlane/pandoc/

  2. Nohorita says:

    Hi Mark,I been wkinrog with IDL7.1 for two years in the Ubuntu and it was wkinrog perfect! But I decided to change to the newest version (12.04.1) and I have been trying to install again IDL71 but I have had this problem /media/IDL71/unix/xinstall.sh: 329: exec: ./xinstall: not found . Could you please help me to solve it?ThanksSebastian

  3. disse:I¡¦m now not certain the place you are getting your info, but great topic. I needs to spend some time finding out much more or understanding more. Thank you for great info I was in search of this info for my mission.

  4. That was beautiful. My grandpa just turned 95 on the first, and I have very similar feelings about him and hope I get a few more years with him. And he was also very dashing in his younger days. His song though? He still enjoys warbling “Oh, my darling I am growing ollllllder, silver hairs among the gold….” It’s pretty cute.

  5. #129 ik ben ook tegen die vorm van discriminatie. Maar ik zie dit heel vaak, dat autochtonen iets doen voor allochtonen omdat ze er zelf baat bij hebben. En dit weer de allochtoon aangerekend wordt.Als albert hein hallal worstjes verkoopt, doen ze dit uit winstoogmerk, maar de PVV stemmer geeft moslims hiervan de schuld…en zien hier islamisering in…. alsof de moslim Alberthein hebben gevraagd om hallal worstjes te verkopen… WIJ HEBBEN ER NIET OM GEVRAAGD.

  6. challenge you to create your content marketing plan today.  Write a 500-word article that your target market would find appealing.  Then, create your content marketing plan around that article using the

Leave a Reply

Your email address will not be published. Required fields are marked *

*