summary refs log tree commit diff
path: root/bin/html.sh
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2021-01-12 18:19:21 -0500
committerJune McEnroe <june@causal.agency>2021-01-12 18:19:21 -0500
commit5e42ec32b98e3f6e19ce10c11cf7c6b85cd48a3a (patch)
tree08f1fddee0906d83c3860d2f23a9e70ec6ab6b77 /bin/html.sh
parentAdd htagml example (diff)
downloadsrc-5e42ec32b98e3f6e19ce10c11cf7c6b85cd48a3a.tar.gz
src-5e42ec32b98e3f6e19ce10c11cf7c6b85cd48a3a.zip
List both Makefile and html.sh under README.7
Diffstat (limited to 'bin/html.sh')
-rw-r--r--bin/html.sh24
1 files changed, 16 insertions, 8 deletions
diff --git a/bin/html.sh b/bin/html.sh
index 600d37f5..5b59003f 100644
--- a/bin/html.sh
+++ b/bin/html.sh
@@ -3,12 +3,15 @@ set -eu
 
 readonly GitURL='https://git.causal.agency/src/tree/bin'
 
-src=$1
-man=${2:-}
+man=$1
+shift
+
+title=${man##*/}
+title=${title%.[1-9]}
 
 cat <<EOF
 <!DOCTYPE html>
-<title>${src}</title>
+<title>${title}</title>
 <style>
 $(./scheme -s)
 
@@ -59,8 +62,13 @@ EOF
 opts='fragment'
 [ "${man}" = "README.7" ] && opts="${opts},man=%N.html"
 mandoc -T html -O "${opts}" "${man}"
-cat <<EOF
-<p>
-<a href="${GitURL}/${src}">${src} in git</a>
-EOF
-./htagml -p -f htmltags "${src}"
+
+while [ $# -gt 0 ]; do
+	src=$1
+	shift
+	cat <<-EOF
+	<p>
+	<a href="${GitURL}/${src}">${src} in git</a>
+	EOF
+	./htagml -p -f htmltags "${src}"
+done