diff options
Diffstat (limited to 'usr/local/bin')
-rwxr-xr-x | usr/local/bin/aboutfilter | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/usr/local/bin/aboutfilter b/usr/local/bin/aboutfilter new file mode 100755 index 0000000..6d4a24f --- /dev/null +++ b/usr/local/bin/aboutfilter @@ -0,0 +1,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|&|\\&|g;s|'|\\'|g;s|\"|\\"|g;s|<|\\<|g;s|>|\\>|g"; echo '</pre>' ;; +esac |