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.

1 require 'redcloth'
3 post = %{
4 your post text goes here
5 }
7 puts post.split("\\n\\n").map { |p|
8     RedCloth.new(p).to_html + "\\n\\n"
9 }