TTY2HTML(1) BSD General Commands Manual TTY2HTML(1) NAME tty2html - filter nroff output for inclusion in an HTML document SYNOPSIS tty2html [-dtitle] [-n] [-i] [-p] [-s] DESCRIPTION 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 enti- ties. The result is written to standard output. The following options are available: -dtitle generate a complete HTML document, with the given title. -i generate italicised text in place of underlined text. -n translate space characters into non-breakable spaces (` '). -p generate preformatted output enclosed in a <PRE> ... </PRE> pair. -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'. EXAMPLES The command man echo | tty2html -p > echo.html writes preformatted HTML to the file echo.html containing a verbatim ren- dering of the the manual page for echo(1). The command man echo | tty2html -p -s > echo.html generates text that will look identical when included in a page whose style specifies span.b { font-weight: bold; } span.i { text-decoration: underline; } or equivalent. The command man echo | tty2html -p -d'manpage - echo(1)' > echo.html writes a complete HTML document to echo.html entitled `manpage - echo(1)'. DIAGNOSTICS If a meaningless sequence of overstrike characters is encountered (such as a pair of differing characters, neither of which is an underscore) then tty2html prints Overstrike XX YY? on standard error (where XX and YY are the offending characters in hex- adecimal) before continuing. (When such a pair is printed on a real teletype, the resulting character will often appear somewhat over- stricken.) SEE ALSO col(1), colcrt(1), expand(1), nroff(1), ul(1) HISTORY tty2html was written in utter disgust minutes after the author looked at the output of `groff -mdoc -Thtml'. AUTHORS tty2html and its manual page were written by Ian Piumarta. 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. BUGS o Options must appear one at a time. o Bulleted lists generate gratuitous `Overstrike 2B 6F?' diagnostics. (There is no HTML entity depicting an `o' colliding with a `+'.) o Output lines are silently truncated at 132 characters. This is, of course, to maintain perfect compatibility with colcrt(1). o `Overstruck' isn't a real word. Please send bug reports to the author at: firstName (at) lastName (dot) com. (See AUTHORS above for suitable values of firstName and lastName.) BSD November 2, 2005 BSD