summary refs log tree commit diff
path: root/www/git.causal.agency/about-filter.sh
blob: 216c86e9ef4b579c7fe3a52a6a1b83f0a69f17c5 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
#!/bin/sh

case "$1" in
	(*.[1-9])
		/usr/bin/mandoc -T utf8 \
			| /usr/local/libexec/ttpre \
			| /usr/bin/sed -E \
				's,([a-z0-9_-]+)[(]([1-9])[)],<a href="\1.\2">&</a>,g'
		;;
	(*)
		exec /usr/local/libexec/hi -l text -f html
		;;
esac