From 070ca5d5383bfd7d7e36e21b5132d4193a72d11c Mon Sep 17 00:00:00 2001 From: Alex Karle Date: Sat, 18 Dec 2021 14:02:49 -0500 Subject: [PATCH] man: Add man page and install recipe --- Makefile | 6 ++++++ blag.1 | 44 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 50 insertions(+) create mode 100644 blag.1 diff --git a/Makefile b/Makefile index d2aaa40..499a76d 100644 --- 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 new file mode 100644 index 0000000..df57406 --- /dev/null +++ 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 +[alexkarle.com] bare links and [alexkarle.com 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 Markdown.pl 1 -- libgit2 1.1.1