mdc - markdown translator
mdc is a Markdown to HTML translator written in gawk. The output files are
- static - if the file is opened from disk it 'just works', and
- complete - it contains some minimal CSS definitions for modern
graphical browser.
If you like or need it, you can optionally add a stylesheet or javascript file, but these are really just add-ons.
Documentation
mdc supports only very basic markup, because I wanted to be able to read the markup source in plain-text. While I was working on mdc I read the basic and extended Markdown information and also about GitHub's own Markdown flavor.
This is mdc's documentation:
- Supported markup lists the supported markup.
- Meta information shows how to work with multiple files and how to integrate CSS and Javascript.
- Using mdc explains mdc's command line.
- There's a simple CGI script wrapping around mdc to edit
files via HTTP.
Downloads
The current version is 1.0.10. Get
- the debian archive: mdc_1.0.10-1_all.deb or
- the tar archive: mdc-1.0.10.tar.gz.
You might want to adapt the script mde to your needs.
- update-html is a shell script that lists all
.md
files, which need to be retranslated because their.html
is older or does not exist.
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 full of extensions to support e.g. coloring source code of very different languages.
I work a lot on the Linux command line and Markdown fits very well because the markup is easily readable and editable, while I can get HTML from it too. I decided to write mdc (instead of using one of the many available Markdown translators) to keep readable plain-text in scope (instead of HTML features). For instance, I made changes like
- table identifiers
|
may be indented with blanks, - code blocks
```
may be indented and the first line's amount of white-space indentation is removed from all lines.
to make the plain-text markup better readable.