239 lines
6.5 KiB
HTML
239 lines
6.5 KiB
HTML
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
<HTML><HEAD><TITLE>Man page of man2html</TITLE>
|
|
</HEAD><BODY>
|
|
<H1>man2html</H1>
|
|
Section: User Commands (1)<BR>Updated: 1 January 1998<BR><A HREF="#index">Index</A>
|
|
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
|
|
|
|
<A NAME="lbAB"> </A>
|
|
<H2>NAME</H2>
|
|
|
|
man2html - format a manual page in html
|
|
<A NAME="lbAC"> </A>
|
|
<H2>SYNOPSIS</H2>
|
|
|
|
man2html [options] [file]
|
|
<A NAME="lbAD"> </A>
|
|
<H2>DESCRIPTION</H2>
|
|
|
|
<B>man2html</B>
|
|
|
|
converts a manual page as found in
|
|
<I>file</I>
|
|
|
|
(or stdin, in case no file argument, or the argument "-", is given)
|
|
from man-style nroff into html, and prints the result on stdout.
|
|
It does support tbl but does not know about eqn.
|
|
The exit status is 0. If something goes wrong,
|
|
an error page is printed on stdout.
|
|
<P>
|
|
This can be used as a stand-alone utility, but is mainly intended
|
|
as an auxiliary, to enable users to browse their man pages using
|
|
a html browser like
|
|
<B><A HREF="/cgi-bin/man/man2html?1+lynx">lynx</A></B>(1),
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?1+xmosaic">xmosaic</A></B>(1)
|
|
|
|
or
|
|
<B><A HREF="/cgi-bin/man/man2html?1+netscape">netscape</A></B>(1).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<P>
|
|
The main part of
|
|
<B>man2html</B>
|
|
|
|
is the troff-to-html engine written by Richard Verhoeven (<A HREF="mailto:rcb5@win.tue.nl">rcb5@win.tue.nl</A>).
|
|
It adds hyperlinks for the following constructs:
|
|
<P>
|
|
|
|
<TABLE>
|
|
<TR VALIGN=top><TD><A HREF="/cgi-bin/man/man2html?3x+foo">foo</A>(3x)</TD><TD>"<A HREF="http://localhost/cgi-bin/man/man2html?3x+foo">http://localhost/cgi-bin/man/man2html?3x+foo</A>"<BR></TD></TR>
|
|
<TR VALIGN=top><TD><A HREF="method://string">method://string</A></TD><TD>"<A HREF="method://string">method://string</A>"<BR></TD></TR>
|
|
<TR VALIGN=top><TD><A HREF="http://www.host.name">www.host.name</A></TD><TD>"<A HREF="http://www.host.name">http://www.host.name</A>"<BR></TD></TR>
|
|
<TR VALIGN=top><TD><A HREF="ftp://ftp.host.name">ftp.host.name</A></TD><TD>"<A HREF="ftp://ftp.host.name">ftp://ftp.host.name</A>"<BR></TD></TR>
|
|
<TR VALIGN=top><TD><A HREF="mailto:name@host">name@host</A></TD><TD>"mailto:<A HREF="mailto:name@host">name@host</A>"<BR></TD></TR>
|
|
<TR VALIGN=top><TD><<A HREF="file:///usr/include/string.h">string.h</A>></TD><TD>"file:/usr/include/string.h"<BR></TD></TR>
|
|
</TABLE>
|
|
|
|
<P>
|
|
|
|
(The first of these can be tuned by options - see below.)
|
|
No lookup is done - the links generated need not exist.
|
|
Also an index with internal hyperlinks to the various sections
|
|
is generated, so that it is easier to find one's way
|
|
in large man pages like
|
|
<B><A HREF="/cgi-bin/man/man2html?1+bash">bash</A></B>(1).
|
|
|
|
<P>
|
|
<A NAME="lbAE"> </A>
|
|
<H2>OPTIONS</H2>
|
|
|
|
When reading from stdin, it is not always clear how to
|
|
do .so expansion. The -D option allows a script to define
|
|
the working directory.
|
|
<P>
|
|
|
|
<DL COMPACT>
|
|
<DT id="1"><B>-D pathname</B>
|
|
|
|
<DD>
|
|
Strip the last two parts from the pathname, and do a
|
|
<I>chdir</I>(<I>dir</I>) before starting the conversion.
|
|
</DL>
|
|
<P>
|
|
|
|
The -E option allows the easy generation of error messages
|
|
from a cgi script.
|
|
<P>
|
|
|
|
<DL COMPACT>
|
|
<DT id="2"><B>-E string</B>
|
|
|
|
<DD>
|
|
Output an error page containing the given error message.
|
|
</DL>
|
|
<P>
|
|
|
|
The general form of a hyperlink generated for a man page reference is
|
|
<DL COMPACT>
|
|
<DT id="3"><DD>
|
|
<method:cgipath><man2htmlpath><separator><manpage>
|
|
</DL>
|
|
<P>
|
|
|
|
with a default as shown above. The parts of this hyperlink
|
|
are set using the various options.
|
|
<DL COMPACT>
|
|
<DT id="4"><B>-h</B>
|
|
|
|
<DD>
|
|
Set method:cgipath to <A HREF="http://localhost.">http://localhost.</A>
|
|
|
|
<DT id="5"><B>-H</B><I> host[.domain][:port]</I>
|
|
|
|
<DD>
|
|
Set method:cgipath to
|
|
http://<I>host.domain:port</I>.
|
|
|
|
<DT id="6"><B>-l</B>
|
|
|
|
<DD>
|
|
Set method:cgipath to
|
|
lynxcgi:<I>/usr/lib</I>.
|
|
|
|
<DT id="7"><B>-L</B><I> dir</I>
|
|
|
|
<DD>
|
|
Set method:cgipath to
|
|
lynxcgi:<I>dir</I>.
|
|
|
|
<DT id="8"><B>-M</B><I> man2htmlpath</I>
|
|
|
|
<DD>
|
|
Set the man2htmlpath to use. The default is
|
|
<I>/cgi-bin/man/man2html</I>.
|
|
|
|
<DT id="9"><B>-p</B>
|
|
|
|
<DD>
|
|
Set separator to '/'.
|
|
<DT id="10"><B>-q</B>
|
|
|
|
<DD>
|
|
Set separator to '?'. This is the default.
|
|
<DT id="11"><B>-r</B>
|
|
|
|
<DD>
|
|
Use relative html paths, instead of cgi-bin paths.
|
|
</DL>
|
|
<P>
|
|
|
|
On a machine without running
|
|
<B>httpd</B>,
|
|
|
|
one can use
|
|
<B>lynx</B>
|
|
|
|
to browse the man pages, using the lynxcgi method.
|
|
When some http daemon is running, lynx, or any other browser,
|
|
can be used to browse the man pages, using the http method.
|
|
The option -l (for `lynxcgi') selects the former behaviour.
|
|
With it, the default cgipath is <I>/usr/lib</I>.
|
|
<P>
|
|
In general, a cgi script can be called by
|
|
<DL COMPACT>
|
|
<DT id="12"><DD>
|
|
<path_to_script>/<more_path>?<query>
|
|
</DL>
|
|
<P>
|
|
|
|
and the environment variables PATH_INFO and QUERY_STRING
|
|
will be set to <more_path> and <query>, respectively.
|
|
Since lynxcgi does not handle the PATH_INFO part, we generate
|
|
hyperlinks with `?' as a separator by default.
|
|
The option -p (for `path') selects '/' as a separator, while
|
|
the option -q (for `query') selects '?' as a separator.
|
|
<P>
|
|
The option -H <I>host</I> will specify the host to use
|
|
(instead of <I>localhost</I>). A cgi script could use
|
|
<DL COMPACT>
|
|
<DT id="13"><DD>
|
|
man2html -H $SERVER_NAME
|
|
</DL>
|
|
<P>
|
|
|
|
if the variable SERVER_NAME is set. This would allow your machine
|
|
to act as a server and export man pages.
|
|
<P>
|
|
<A NAME="lbAF"> </A>
|
|
<H2>BUGS</H2>
|
|
|
|
There are many heuristics. The output will not always be perfect.
|
|
The lynxcgi method will not work if lynx was compiled without
|
|
selecting support for it. There may be problems with security.
|
|
<P>
|
|
<A NAME="lbAG"> </A>
|
|
<H2>AUTHOR</H2>
|
|
|
|
Richard Verhoeven was the original author of
|
|
<B>man2html</B>.
|
|
|
|
Michael Hamilton and Andries Brouwer subsequently improved on it.
|
|
Federico Lucifredi <<A HREF="mailto:flucifredi@acm.org">flucifredi@acm.org</A>> is the current maintainer.
|
|
<P>
|
|
<A NAME="lbAH"> </A>
|
|
<H2>SEE ALSO</H2>
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?1+lynx">lynx</A></B>(1),
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?1+man">man</A></B>(1),
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?1+hman">hman</A></B>(1)
|
|
|
|
<P>
|
|
|
|
<HR>
|
|
<A NAME="index"> </A><H2>Index</H2>
|
|
<DL>
|
|
<DT id="14"><A HREF="#lbAB">NAME</A><DD>
|
|
<DT id="15"><A HREF="#lbAC">SYNOPSIS</A><DD>
|
|
<DT id="16"><A HREF="#lbAD">DESCRIPTION</A><DD>
|
|
<DT id="17"><A HREF="#lbAE">OPTIONS</A><DD>
|
|
<DT id="18"><A HREF="#lbAF">BUGS</A><DD>
|
|
<DT id="19"><A HREF="#lbAG">AUTHOR</A><DD>
|
|
<DT id="20"><A HREF="#lbAH">SEE ALSO</A><DD>
|
|
</DL>
|
|
<HR>
|
|
This document was created by
|
|
<A HREF="/cgi-bin/man/man2html">man2html</A>,
|
|
using the manual pages.<BR>
|
|
Time: 00:05:19 GMT, March 31, 2021
|
|
</BODY>
|
|
</HTML>
|