aboutsummaryrefslogtreecommitdiff
path: root/usr/local/bin/aboutfilter
blob: 6d4a24fd6e7f0b5246459871cceb623205079492 (plain)
1
2
3
4
5
6
7
#!/bin/sh

case "$1" in
*.html)		exec cat ;;
*.[1-9])	mandoc -T html -O fragment | sed 's/<a class="permalink"/& style="color: black; text-decoration: none;"/;s/<td class="head-vol"/& style="text-align: center;"/;s/<td class="head-rtitle"/& style="text-align: right;"/;s/<table class="head"/& style="width: 100%;"/;s/<td class="foot-os"/& style="text-align: right;"/;s/<table class="foot"/& style="width: 100%;"/;s/<div class="Nd"/& style="display: inline;"/;s/<h2/<h3/;s/<h1/<h2/;s </h2 </h3 ;s </h1 </h2 ' ;;
*)		echo '<pre>'; sed "s|&|\\&amp;|g;s|'|\\&apos;|g;s|\"|\\&quot;|g;s|<|\\&lt;|g;s|>|\\&gt;|g"; echo '</pre>' ;;
esac