Freelance Writer, Photographer, Photojournalist & Novelist
 
 

Markdown Utilities & Links by Tammy Cravit

What is Markdown? Why This Site?

Markdown is a cross-platform utility by John Gruber that converts a fairly simple text-based markup language to HTML. As a writer, I work on a variety of systems: my desktop machine is (presently) a PC running Windows XP, but I also sometimes work on a FreeBSD server or my AlphaSmart, and I'm lusting after a Mac. So, I do almost all of my writing in Markdown format, which I can then convert to HTML (for the Web) or -- via John Macfarlane's Pandoc utility -- to RTF or ODT for formatting and printing/emailing.

This page contains some utilities I've written to support that effort. Unless otherwise noted, these tools will require Ruby (I use version 1.8.7).

My Utilities

  • markupwc (source, download)
    A utility that behaves similarly to the Unix wc(1) command. It will count the words, characters, and/or lines in one or more Markdown (or Textile) files. To use it with Markdown files, rename or symlink it to either mkdwc or mmwc. To use it with Textile files, rename or symlink it to ttwc.

  • mkd2odt (source, download)
    A shell script wrapper around pandoc to convert Markdown files to ODT. (Actually, this script will generate any of the output formats supported by Pandoc; simply rename it to mkd2XXX, where XXX is the name of the Pandoc output format.)

My Tools & Workflow

Here's how I typically work:

  1. Edit my work. On my PC, I use the wonderful e text editor. On a Mac, I'd use TextMate instead. On Unix, I usually use Emacs, but am on the lookout for a TextMate-workalike for Unix.
  2. For rough printing, I use the "Convert to HTML" feature in my editor.
  3. When I'm ready to print or submit a final draft of something, I use Pandoc to convert the Markdown file to ODT, and then open it up in OpenOffice for final tweaking. I then export to DOC, RTF, etc. as appropriate.