Dropping Keys

Brooks Duncan on Work, Management, Leaving the Cubicle, and Life in General

text

Using Hazel and Markdown To Make Writing For The Web More Productive

Even though I have been blogging at DocumentSnap for quite a while, I’ve never taken much time to make my writing more productive. That’s all changed in the past few weeks, and I’ve started looking for ways to make my workflow more efficient.

Various DocumentSnap readers had been recommending Hazel to me for quite some time, but I had never gotten around to checking it out until I finally decided to write a post about using Hazel in a paperless workflow.

Since writing that post and listening to the Mac Power Users podcast about it, I have become a complete Hazel addict. I’m now actively trying to find more and more things to Hazel-ify on my Mac.

So I got to thinking, how can I use Hazel to speed up blogging?

At the same time as getting in to Hazel, I’ve started using Jon Gruber’s Markdown syntax. In the past, I wrote either in the Wordpress admin interface or in ecto, but the latter kept losing posts and it was driving me nuts.

Recently I switched to writing everything in a text editor using Markdown, which I am completely loving. I started using TextWrangler, but now I have switched to WriteRoom which I had gotten free in a MacHeist bundle a long time ago.

WriteRoom is great by the way. Here’s a screenshot of this post as I am writing this (how meta):

Since my switch to WriteRoom, I had to figure out a way to run Markdown against my text files and I thought “hey, why not use Hazel?”. Here’s what I did.

Create a rule to run Markdown

Since I save all my Markdown’ed posts as .txt file in a folder, I set up a Hazel rule to watch that folder for anything .txt. If it finds it, it runs the Markdown perl script against it and outputs it to an .html file. Here’s a screenshot of the rule:

Clean up the old html files

I don’t really care to keep around the .html files because I can just let Hazel re-generate them in the unlikely event that I need the file again. I decided to keep them around for a week, so here is my rule for that:

Post to the web

If I was using something like TextMate, I could use the blogging bundle to post online. But for now, I just copy and paste the contents of the .html file into Wordpress or Tumblr admin interface and then add in the images there.

What’s next?

I am pretty I can improve the workflow of adding images to the posts instead of manually uploading them to the admin interface and adding them into the post there. That’ll be next I think.

Do you have any good tips for making writing for the web more efficient? I’d love to hear them.

blog comments powered by Disqus
  1. brooksduncan posted this

Following