summary refs log tree commit diff
path: root/bin/html.sh
diff options
context:
space:
mode:
Diffstat (limited to 'bin/html.sh')
-rw-r--r--bin/html.sh14
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}"