diff options
author | June McEnroe <june@causal.agency> | 2019-02-20 19:54:45 -0500 |
---|---|---|
committer | June McEnroe <june@causal.agency> | 2019-02-20 19:54:45 -0500 |
commit | 48674c63dd5b29d2eb2f4af71e0c1f4ffc5b835e (patch) | |
tree | 369737e8086b25cd292710817a6fdba70e531a42 /bin/html.sh | |
parent | Add Dirk Gently's Holistic Detective Agency (diff) | |
download | src-48674c63dd5b29d2eb2f4af71e0c1f4ffc5b835e.tar.gz src-48674c63dd5b29d2eb2f4af71e0c1f4ffc5b835e.zip |
Factor out html.sh and produce html for all sources
Except for gfx-cocoa because I don't have an Objective-C highlighter. Also hypothetically the .h rule could match up headers with .3 manual pages if I cared to write them.
Diffstat (limited to 'bin/html.sh')
-rw-r--r-- | bin/html.sh | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/bin/html.sh b/bin/html.sh new file mode 100644 index 00000000..3179c4b7 --- /dev/null +++ b/bin/html.sh @@ -0,0 +1,14 @@ +#!/bin/sh +set -eu + +readonly GiteaURL=https://code.causal.agency/june/src/src/branch/master/bin + +src=$1 +man=${2:-} + +./hi -f html -o document,tab=4 -n "${src}" /dev/null +cat <<- EOF + <code><a href="${GiteaURL}/${src}">${src} in git</a></code> +EOF +[ -f "${man}" ] && man -P cat "${man}" | ./ttpre +./hi -f html -o anchor "${src}" |