WIP markup parser (txt -> html)
git clone git://
Log | Files | Refs | README | LICENSE

commit 070ca5d5383bfd7d7e36e21b5132d4193a72d11c (patch)
parent 766f801e12a85ccfa1b46c1fb701e1d3756b7626
Author: Alex Karle <>
Date:   Sat, 18 Dec 2021 14:02:49 -0500

man: Add man page and install recipe

MMakefile | 6++++++
Ablag.1 | 44++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 50 insertions(+), 0 deletions(-)

diff --git a/Makefile b/Makefile @@ -22,3 +22,9 @@ check: blag .PHONY: clean clean: rm -f blag + +.PHONY: install +install: + mkdir -p $(HOME)/bin $(HOME)/share/man/man1 + install -m 555 blag $(HOME)/bin + install -m 444 blag.1 $(HOME)/share/man/man1 diff --git a/blag.1 b/blag.1 @@ -0,0 +1,44 @@ +.Dd December 18, 2021 +.Dt BLAG 1 +.Os +.Sh NAME +.Nm blag +.Nd convert plaintext to HTML +.Sh SYNOPSIS +.Nm blag +< +.Ar in.txt +> +.Ar out.html +.Sh DESCRIPTION +.Nm +is a very basic plaintext-to-HTML converter. +It reads from stdin and writes to stdout so that it can +.Xr pledge 2 +to only stdio. +Any arguments given will produce an error. +.Pp +Like markdown, wrapped lines are supported, +and a blank line is needed to start a new paragraph. +.Pp +The following markup is supported: +.Pp +.Bl -bullet -indent +.It +Inline *bold*, _italics_, `code` (bold/italics disabled in code) +.It +backslash to escape +.It +[] bare links and [ description] +.It +# headers (each # adds a level) +.It +Ordered and unordered lists via 1-9. and - respectively. +Nesting supported only within the same type (no mixing, yet). +.It +Code blocks (start line with TAB) +.It +Block quotes (start line with >) +.El +.Sh SEE ALSO +.Xr 1