Manpage.cgi
presents manual pages via
HTTP.
It also renders internal anchors for the sections in the page,
links to other manual pages, and the description of options. in the page,
links to other manual pages, and the description of options.
There is a lot to me said for having all the documentation for the system commands available to everyone, all the time. Having used many time sharing systems and command-line interfaces in my time, take this an my attestation that there is no substitute for quick and easy access to the up-to-the minute documentation on the screen when you need it.
To that end I coded a simple
CGI script to
push nroff
formatted manual pages into
a browser. I did that because the hypertext navigation in a browser
complements a terminal session nicely, and one can awlays use
lynx
when stuck on a serial console. Altenatives
like recoding every document in info
do not
apeal to me. Mostly because that doesn't add any value to the existing
work.
Rendered as:<A href="/cgi-bin/manpage.cgi?ls&1"><b>ls</b>(1)</A>
ls(1)
NAME
,
SYNOPSIS
,
DESCRIPTION
,
OPTIONS
,
EXAMPLES
, and
SEE ALSO
).
I chose to build the links in that same way that I built them in my
own web pages. The sections get the first word in the section name as the
anchor:
Let's also build anchors for the desciption of each command-line option. Each option description should also get an anchor tag<b id="OPTIONS">OPTIONS</b> <b id="SEE">SEE ALSO</b>
opt_
letter
for
the lowercase letters
or
opt_u
Letter
for
the uppercase Letters
.
So the options -h
and -H
get markup like:
<b id="opt_h">-h</b> <b id="opt_uh">-H</b>
ckman
HTML document.
$Id: manpage.html,v 1.7 2013/05/18 21:42:05 ksb Exp $ by ksb.