[ This is a sample file for converting BNC tagged text

/A "<HTML>{CHR(13)}{CHR(10)}<HEAD>{CHR(13)}{CHR(10)}" START
/T "<title>*</title>" -> "*"
/A "</BODY>{CHR(13)}{CHR(10)}</HTML>{CHR(13)}{CHR(10)}" END
[ additions to make output HTML-like for reading in browser

/F "<header*(25000)/header>" -> ""
[ cut the header if found within 25000 characters
[ /F means operate this change only in the First chunk of text 
[ for additional speed

"{CHR(10)}" -> " "
"{CHR(13)}" -> " "
[ cut line-feeds and carriage returns (paragraphs are tagged)

/F "<text complete=Y" -> "{WRITTEN complete}{CHR(13)}{CHR(10)}{/HEAD}{BODY}<"
/F "<text complete=N" -> "{WRITTEN fragment}{CHR(13)}{CHR(10)}{/HEAD}{BODY}<"
/F "<stext complete=Y" -> "{SPOKEN complete}{CHR(13)}{CHR(10)}{/HEAD}{BODY}<"
/F "<stext complete=N" -> "{SPOKEN fragment}{CHR(13)}{CHR(10)}{/HEAD}{BODY}<"
[ what kind of BNC text is this?

"&amp;sup1" -> "1"
"&amp;sup2" -> "2"
"&amp;sup3" -> "3"
"?;?" -> "??"
[ replace character;character by charactercharacter
"&percnt" -> "%"
"&copy" -> "{CHR(169)}"
"&bull" -> " {CHR(42)} "
"&Ecirc" -> "{CHR(202)}"
"&ecirc" -> "{CHR(234)}"
"&Eacute" -> "{CHR(201)}"
"&eacute" -> "{CHR(233)}"
"&ouml" -> "{CHR(246)}"
"&auml" -> "{CHR(228)}"
"&ndash" -> "-"
"&mdash" -> "{CHR(151)}"
"&hellip" -> "-"
"&lsqb" -> "["
"&rsqb" -> "]"
"&ast" -> "{CHR(42)}"
"&equals" -> "="
"&percent" -> "%"
"&ins" -> "{CHR(34)}"
"&plus" -> "+"
"&times" -> " X "
"&dollar" -> "$"
"&pound" -> ""
"&quot" -> """
"&bquo" -> """
"&equo" -> """
"&amp" -> "&"
[ convert various symbols (much more legible!)

"<p>" -> "{CHR(13)}{CHR(10)}{p}"
"</p>" -> "{/p}{CHR(13)}{CHR(10)}"
"<head *(20)=SUB>" -> "{CHR(13)}{CHR(10)}{h3}" {v="3"}
"<head *(20)=MAIN>" -> "{CHR(13)}{CHR(10)}{h2}" {v="2"}
"</head>" -> "{/h{v}}{CHR(13)}{CHR(10)}"
"<u who=*>" -> "{*:}{CHR(9)}"
"</u>" -> "{/p}{CHR(13)}{CHR(10)}"
[ "<div?>" -> "{section}{CHR(13)}{CHR(10)}"
"<item>" -> "{CHR(13)}{CHR(10)}{CHR(9)}"
[ carriage-return+line-feed at beginings & ends of paragraphs etc.

"<*>" -> ""
[ cut out ALL other tags!

"{" -> "<"
"}" -> ">"
[ restore any <> from {}

"</HEAD>" -> "</HEAD>{CHR(13)}{CHR(10)}"
"<BODY>" -> "<BODY>{CHR(13)}{CHR(10)}"
[ more HTML tags

/S
[ get rid of any surplus spaces

finish
