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

export LANG=en_US.UTF-8
case "$1" in
	(*.[1-9])
		/usr/bin/mandoc \
			| /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