[conspire] The simpler life

Nick Moffitt nick at zork.net
Mon Sep 21 03:38:25 PDT 2015


I have gone through several HTML generation tools in the past two
decades.  I decided early on in the mid-90s that HTML wasn't fit for
human consumption^[and thus, production], and worked to treat it as an
object format to be targeted with some kind of compiler.  It seems this
is a more popular technique these days, which is cheering.

## M4

One of my earliest discoveries was the M4 macro preprocessor (late of
the RATFOR language made famous by Software Tools).  I used this to make
the Windows Refund Day newsletter, and it worked well for quick edits.

Most people who encountered M4 did so a few years later, when Sendmail
packaged up common sendmail.cf snippets as M4 macros.

## tron.awk

While I was working on the LNX-BBC, I wrote a page-long AWK script that
converted plain text to HTML following inspiration from both standard
e-mail conventions and MoinMoin's wiki markup.  Don Marti featured it
once in his short-lived "Aspire to Crudeness" newsletter, which is about
all the fanfare I think it deserved.

## ReST

Python has its own documentation format that means to be legible in
plain text.  I discussed its design with the maintainers once on IRC,
and mentioned a number of precedents I'd encountered (The FUDGE RPG used
to be distributed with a description of its markup conventions for
anyone looking to write a translator, and I of course mentioned markdown
and Moin and my own AWK script.).

The response came back: 

> It's a common itch, oft-scratched.

## pandoc

This is where I'm doing everything today.  It supports many of the
formats written by eager itch-scratchers.  It is also well-written,
actively maintained, and extensible through scripts and templates.  It
supports nearly the full cross-product of the formats it supports, and I
am confident enough in its design to keep this in my mailcap:

    text/html; /usr/bin/pandoc -f html -t markdown+hard_line_breaks '%s'; copiousoutput

I recently started using tufte.css with colours from the Solarized
palette, because I really shouldn't be trusted with visual design much.
[The result is
attractive](http://zork.net/~nick/.podcast/interviews.html) and [the
source is easily read as
well](http://zork.net/~nick/.podcast/interviews.md).

----

Thanks to github, markdown seems to be the system of pretty-plain-text
that won out, here.  And pandoc's dialect of markdown is full of extras
like footnotes and syntax highlighting (which you'll notice I reduce
down to a monochrome scheme in
<http://zork.net/~nick/.podcast/transcribe.html#commit-your-changes-in-git>)

One thing that's been consistent through all of this is that I've kept a
Makefile handy for managing the conversions.  Some things never change!





More information about the conspire mailing list