Mawkdown, a lightweight, line-oriented(ish) text markup tool implemented in Awk

4 months ago 4

A lightweight, line-oriented(ish) text markup tool implemented in awk.

Installation

PREFIX=~/.local make install with PREFIX of choice.

Usage

You probably shouldn't, but mawkdown -d header.html -f footer.html < input.md > output.html.

See mawkdown -h for the options.

The md2md script can partially convert markdown to mawkdown.

Cheat sheet

# A comment # Can be used for metadata read by other tools = Level 1 heading == Level 2 heading === Level 3 heading ==== Level 4 heading ===== Level 5 heading ====== Level 6 heading Paragraph. New paragraph. - Unordered list - A second list item + Ordered list + Another list item Inline markup includes /emphasis/, *strong*, `fixed width`, and [https://owl.is|hyperlinks]. Formatting characters can be escaped with \/backslash\/. There are also footnotes^1; they can contain any alphanumeric characters^uggla2025. ^1 This will be rendered in a list at the end. ^uggla2025 And so will this. | A blockquote, | spanning several... | lines. > Preformatted text. > No /formatting/ applies in *here*. <img alt="Standard HTML also works, but is not validated.">

Tests

Run make test.

Future plans

No not really.

Why?

I just think awk is neat, and it feels good to have only stable and ubiquitous POSIX tools as dependencies for my website.

Read Entire Article