Logo address

text2html

NAME

	text2html

SYNOPSIS

	text2html [-t] [file]

DESCRIPTION

Text2html converts plain text to HTML format. The resul looks like plain text on browser window.
In case that file is absent, text2html reads input from stdin.

Without flag "-t", text2html converts only three characters '&', '<' and '>' to '&amp;', '&lt;' and '&gt;' respectively. Thus spaces are untouched and thereby contiguous spaces are visible as single space; line breaks are also ignored.

With the flag, the converted text will be shown on browser screen much faithfully.
The first space code in contiguous spaces is untouched but spaces that follows are converted to '&nbsp'. Thus contiguous spaces is visible as it is. Contiguous empty lines are visible as it is.

EXAMPLES

term% cat b
three spaces "   "
three lines follows



text end here.
term% text2html b
three spaces "   "
three lines follows



text end here.
term% text2html -t b
<p>three spaces " &nbsp;&nbsp;"</p>
<p>three lines follows</p>
<br>
<br>
<br>
<p>text end here.</p>

SOURCE

http://plan9.aichi-u.ac.jp/netlib/cgitools/