Last modified: 2021-09-18 08:53

mdc - markdown translator

mdc is a Markdown to HTML translator written in gawk. The output files are

I you like or need, you can optionally add a stylesheet or javascript file, but these are really just add-ons.


mdc supports only very basic markup, because I wanted to be able to read the markup source is plain-text. While I was working on mdc I consulted Markdown information about basic and extended and also GitHub.


The current version is 1.0.4. Get

You might want to adapt to script mde to your needs.

Why mdc?

I started thinking about Markdown when I was about to create a Github account. Markdown is their chosen markup language for HTML pages and their Markdown dialect is fully or extensions to support e.g. colouring source code of very different languages.

At that time I was pretty happy using wiki-like markup to write some documentation. From a CGI script I could edit the file's markup, the script converted that to simple clean-looking HTML and added some navigation links to it. A simple Javascript file allowed keyboard navigation and static versions of the wiki files would go online. My original design goal for mdc was to have that again but this time with Markdown.

I'm tinkering with Raspberry Pis of all sizes. Have you ever tried to open Chrome on a Pi Zero? This is not really working and I asked myself how I could read and write my documents from a small Raspi. Without a modern browser. While I was considering possible solutions I was reminded of an "old" (in terms of Internet time) Internet protocol for document retrieval: Gopher. Instead of HTML pages it uses directories to link files and the native content-type is plain-text. (Gopher is from before the early 90's and there was no HTML. As far as I know it was the first anonymous client/server document retrieval protocol on the Internet.) Markdown fits very well into this.

In fact the files you find here have a Gopher server as primary source.

During my work on Gopher software I decided to implement some Markdown syntax deviations like

to make the plain-text markup better readable.