m2h 1.3.1 Documentation

m2h Copyright 1997-2000 by Richard Dawe
m2h is distributed under the terms of the GNU General Public License


m2h is a Perl script that converts man pages into HTML documents using a brute force (i.e. simple to program) approach. It is a fairly basic program, and should run on any system with man and Perl 5. A man command for DOS can be obtained from a mirror of DJGPP, such as the mirror of DJGPP at Sunsite UK. Perl 5 for Win32 (Windows '95 and Windows NT) can be found at ActiveState.



m2h [-h | --help]
    [-htm | --htm]
    [-idx:<index name> | --index:<index name>]
    [-1 | -one | --one | --all-in-one]
    [-sfn | --sfn]

The switches -h or --help will give a brief description of how to use m2h.

m2h should be run from the directory above the man tree you wish to index, i.e. from the directory which 'man' resides in. m2h will create a directory called 'html', and subdirectories called 'html<section>', where <section> is the corresponding man section, i.e. for a page from 'man<section>'. It will generate an HTML index file, and HTML for each man page. A file, detailing conversion problems m2h has, will also be created.

m2h's output is quite flexible. The '-htm' switch tells the program to use the extension '.htm' for its HTML output, which would be useful with Windows web servers. The switch '-idx' tells m2h which file name (without extension) to use for the output index. The '-1' switch ("all-in-one") tells the program to output all HTML into the index file, i.e. will contain both the index and HTML for each man page. The '-sfn' switch ("short filenames") tells the program to output HTML files with short filenames, the 8+3 convention for DOS - this automatically uses the '-htm' option. This might be useful if you want to generate the pages for use under DOS.


If the following examples are run on Unix, then the 'perl' command can be omitted.

perl m2h.pl
This creates a tree of html pages with the same structure as the man pages. Each man page has an HTML page.

perl m2h.pl -htm -1 -idx:manpages
This creates one HTML page called 'manpages.htm' which contains the index and all the man pages.

This document was written by Richard Dawe. His home page can found at http://www.bigfoot.com/~richdawe/ and his
e-mail address is webmaster@phekda.org.