browse UNIX man pages through WWW
Man-cgi is shell-sed-awk script which converts on the fly
the output of the "man" command to HTML.
Here is the normal output
of the command
"man elm" and the same man page
formatted with Man-cgi.
Here is the source of Man-cgi.
Special versions of man-cgi are also available:
- SGI machines, thanks to Jeff C. Glover <email@example.com>
- Sun Solaris, thanks to David J. Adams <D.J.Adams@soton.ac.uk>
Man-cgi is made to be used as a cgi program from an HTTPD server.
In order to work properly following things should be done by the server
Copy the script itself in the /cgi-bin/ directory of the server.
Turn on the "execute" bit of the script :
chmod +x man-cgi
Edit the Configuration Section of the script. That section contains
five variables that should be adjusted (
You would probably want to get local copies of the two images that Man-cgi uses. These images are:
When called without arguments (http://www-server/cgi-bin/man-cgi) it outputs a
"Front Page" with a section list
and query form. When called with arguments, the first argument is the topic
(e.g. ls) and the second argument (optional) is the section to look in.
- Multiple blank lines are supressed.
- Man-cgi now recognizes cross-references that
contain periods (e.g. foo.foo(3)).
- Really fixed problems occuring in pages which used
multi-overstrike for emboldening (hopefully).
- Fixed problems occuring in pages which used multi-overstrike
for emboldening. Now Man-cgi works any number of overstrike.
- Fixed problem with hyphenated cross-references.
- and earlier, no history at that time...
Here are some things that I may add to the script:
- Automatic section adjustment. When Man-cgi creates a
cross-reference in a man page to another man page it uses the section
number provided by the man page. This could be a problem because a
man page can be stored in a different section. For example, in our
system the X11 man pages are stored in the "x" section, but the references
in the man pages point to section "1" (e.g.
instead of the correct
- Rewrite the whole script in PERL.
- Add more sed rules to improve the HTML output.
- Support indexes (man -i ...).
Panagiotis Christias, firstname.lastname@example.org