Blogging with RedCloth and WordPress

I don’t particularly like WordPress’ built-in editor. I don’t like typing HTML by hand, especially since I’ve found Textism. I tried using Ruby’s RedCloth gem to convert my blog drafts from Writeboards into HTML that I can stuff into WordPress, but it replaces each double-newline with </p><p>, which makes it hard as hell to read.

So I threw together this ever-so-tiny ruby script that first splits the text on double-newlines, and then pumps each paragraph to RedCloth. It’s nothing special, but after two non-techie posts, I thought I’d balance it out with at least something. The Dvorak post, and this one, were written with this script.

require 'redcloth'

post = %{
your post text goes here

puts post.split("\\n\\n").map { |p| + "\\n\\n"