.\" The following commands are required for all man pages. .Dd November 2, 2005 .Os "" .Dt TTY2HTML 1 .\" ---------------------------------------------------------------- .Sh NAME .\" .Nm tty2html .Nd filter nroff output for inclusion in an HTML document .\" ---------------------------------------------------------------- .Sh SYNOPSIS .\" .Nm tty2html .Op Fl d\fRtitle .Op Fl n .Op Fl i .Op Fl p .Op Fl s .\" ---------------------------------------------------------------- .Sh DESCRIPTION .\" .Nm tty2html reads standard input filtering out backspaces and overstruck characters, translating them into HTML tags describing the bold and underlined characters that would be produced on a teletype or terminal. Tab characters are expanded to the appropriate number of spaces, and HTML meta characters (\`"', `&', `<' and `>') are converted into named entities. The result is written to standard output. .Pp The following options are available: .Bl -tag -width indent .It Fl d\fRtitle generate a complete HTML document, with the given title. .It Fl i generate italicised text in place of underlined text. .It Fl n translate space characters into non-breakable spaces (` '). .It Fl p generate preformatted output enclosed in a
...pair. .It Fl s generate output suitable for use with a style sheet. Bold text is placed in a SPAN of class `b', and italic text in a SPAN of class `i'. The entire output is enclosed in a DIV of class `nroff'. .El .\" ---------------------------------------------------------------- .Sh EXAMPLES .\" The command .Bd -literal -offset indent man echo | tty2html -p > echo.html .Ed .Pp writes preformatted HTML to the file .Pa echo.html containing a verbatim rendering of the the manual page for .Xr echo 1 . The command .Bd -literal -offset indent man echo | tty2html -p -s > echo.html .Ed .Pp generates text that will look identical when included in a page whose style specifies .Bd -literal -offset indent span.b { font-weight: bold; } span.i { text-decoration: underline; } .Ed .Pp or equivalent. The command .Bd -literal -offset indent man echo | tty2html -p -d'manpage - echo(1)' > echo.html .Ed .Pp writes a complete HTML document to .Pa echo.html entitled `manpage - echo(1)'. .\" ---------------------------------------------------------------- .Sh DIAGNOSTICS .\" If a meaningless sequence of overstrike characters is encountered (such as a pair of differing characters, neither of which is an underscore) then .Nm tty2html prints .Bd -literal -offset indent Overstrike XX YY? .Ed .Pp on standard error (where XX and YY are the offending characters in hexadecimal) before continuing. (When such a pair is printed on a real teletype, the resulting character will often appear somewhat overstricken.) .\" ---------------------------------------------------------------- .Sh SEE ALSO .\" .Xr col 1 , .Xr colcrt 1 , .Xr expand 1 , .Xr nroff 1 , .Xr ul 1 .\" ---------------------------------------------------------------- .Sh HISTORY .\" .Nm tty2html was written in utter disgust minutes after the author looked at the output of `groff -mdoc -Thtml'. .\" ---------------------------------------------------------------- .Sh AUTHORS .\" .Nm tty2html and its manual page were written by .An "Ian Piumarta" . .Pp The software is provided as-is, with absolutely no warranty, in the hope that you will enjoy and benefit from it. You may use (entirely at your own risk) and redistribute it under the terms of a very liberal license that does not seek to restrict your rights in any way (unlike a certain immensely popular license that significantly limits your freedom in the name of 'free' software that is, ultimately, anything but free). See the file COPYING for details. .\" ---------------------------------------------------------------- .Sh BUGS .\" .Bl -bullet .It Options must appear one at a time. .It Bulleted lists generate gratuitous `Overstrike 2B 6F?' diagnostics. (There is no HTML entity depicting an `o' colliding with a `+'.) .It Output lines are silently truncated at 132 characters. This is, of course, to maintain perfect compatibility with .Xr colcrt 1 . .It `Overstruck' isn't a real word. .El .Pp Please send bug reports to the author at: firstName (at) lastName (dot) com. (See .Sx AUTHORS above for suitable values of firstName and lastName.)