Page is a not externally linkable
- Hardware and OS Related Technologies
-- Linux, Unix, and *nix like Operating Systems
---- Windsor, and other *nix experts, we need some tutorials


windsor - 12:31 am on Feb 5, 2002 (gmt 0)


Er.. uh...

Most working UNIX (or UNIX-like) installations already have this capability without the need to add new software.

groff(1), the tool to convert man source to text, can also convert it to HTML.

Backing up a bit.. manpage sources are kept in /usr/share/man/man* or /usr/man/man*. You might see some /usr/share/man/cat* (or /usr/man/cat*), but those are already (text) formatted, and don't help much here.

When you type "man foo" and the 'foo' manpage needs to be formatted on-the-fly (i.e. it doesn't reside in /usr/share/man/cat*, but is in /usr/share/man/man*), man(1) does a:

groff -man -Tascii foo.1 ¦ less

In some cases, it does:


groff -mdoc -Tascii foo.1 ¦ less

instead. That depends on the OS and some other conditions. If "-man" doesn't look like a manpage, try "-mdoc".

If you want to generate HTML from manpage source, just type:

groff -man -Thtml foo.1 > /tmp/foo.1.html

and then pull it up with your browser. If you have a webserver running at home (don't we all?), then do this for everything you find and make it a permanent part of your website at home.

Rob++


Thread source:: http://www.webmasterworld.com/linux/84.htm
Brought to you by WebmasterWorld: http://www.webmasterworld.com