The switch '-h' will give a brief description of how to use man2html.
man2html should be run from the directory above the man tree you wish to index, i.e. from the directory which 'man' resides in. man2html 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 man2html has, will also be created.
man2html'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 man2html 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.
perl man2html.pl
This creates a tree of html pages with the same structure as the man
pages. Each man page has an HTML page.
perl man2html.pl -htm -1 -idx:manpages
This creates one HTML page called 'manpages.htm' which contains the
index and all the man pages.