man2html 1.2 Documentation

man2html Copyright 1997, 1998 by Richard Dawe

Introduction

man2html 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.

Usage

Syntax

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

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.

Examples

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

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.



This document was written by Richard Dawe. His home page can found at http://irix.bris.ac.uk/~rd5718/ and his
e-mail address is rd5718@bristol.ac.uk.