mirror of
https://github.com/omar-polo/gmid.git
synced 2024-10-05 08:47:04 +02:00
31 lines
407 B
Bash
Executable File
31 lines
407 B
Bash
Executable File
#!/bin/sh
|
|
#
|
|
# usage: mdoc2html.sh src out
|
|
#
|
|
# converts the manpage `src' to the HTML file `out', tweaking the
|
|
# style
|
|
|
|
set -e
|
|
|
|
: ${1:?missing input file}
|
|
: ${2:?missing output file}
|
|
|
|
man -Thtml -l "$1" > "$2"
|
|
|
|
exec ed "$2" <<EOF
|
|
/<style>
|
|
a
|
|
body {
|
|
max-width: 960px;
|
|
margin: 0 auto;
|
|
padding: 0 10px;
|
|
font-size: 1rem;
|
|
}
|
|
|
|
pre {
|
|
overflow: auto;
|
|
}
|
|
.
|
|
wq
|
|
EOF
|