Blob


1 #!/bin/sh
2 #
3 # usage: mdoc2html.sh src out
4 #
5 # converts the manpage `src' to the HTML file `out', tweaking the
6 # style
8 set -e
10 : ${1:?missing input file}
11 : ${2:?missing output file}
13 man -Thtml -l "$1" > "$2"
15 exec ed "$2" <<EOF
16 /<style>
17 a
18 body {
19 max-width: 960px;
20 margin: 0 auto;
21 padding: 0 10px;
22 font-size: 1rem;
23 }
25 pre {
26 overflow: auto;
27 }
28 .
29 wq
30 EOF