TTY2HTML(1) BSD General Commands Manual TTY2HTML(1) NNAAMMEE ttttyy22hhttmmll - filter nroff output for inclusion in an HTML document SSYYNNOOPPSSIISS ttttyy22hhttmmll [--nn] [--pp] [--ss] DDEESSCCRRIIPPTTIIOONN ttttyy22hhttmmll 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: --ii generate italicised text in place of underlined text. --nn translate space characters into non-breakable spaces (` '). --pp generate preformatted output enclosed in a
 ... 
pair. --ss 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'. EEXXAAMMPPLLEESS The command man echo | tty2html -p > echo.html writes preformatted HTML to the file _e_c_h_o_._h_t_m_l containing a verbatim ren- dering of the the manual page for echo(1). The command man echo | tty2html -p > echo.html generates text that will look identical provided the page style includes span.b { font-weight: bold; } span.i { text-decoration: underline; } or equivalent. DDIIAAGGNNOOSSTTIICCSS If a meaningless sequence of overstrike characters is encountered (such as a pair of differing characters, neither of which is an underscore) then ttttyy22hhttmmll 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.) SSEEEE AALLSSOO col(1), colcrt(1), expand(1), nroff(1), ul(1) HHIISSTTOORRYY ttttyy22hhttmmll was written in utter disgust minutes after the author looked at the output of `groff -mdoc -Thtml'. AAUUTTHHOORRSS ttttyy22hhttmmll 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. BBUUGGSS ++oo Options must appear one at a time. ++oo Bulleted lists generate gratuitous `Overstrike 2B 6F?' diagnostics. (There is no HTML entity depicting an `o' colliding with a `+'.) ++oo Output lines are silently truncated at 132 characters. This is, of course, to maintain perfect compatibility with colcrt(1). ++oo `Overstruck' isn't really a word. Please send bug reports to the author at: firstName (at) lastName (dot) com. (See _A_U_T_H_O_R_S above for suitable values of firstName and lastName.) BSD November 2, 2005 BSD