[(PYVMS LOGO)] HTML2RNO.PY is a Python program, that is used to convert a '.HTML' file to a '.RNO' file. The '.RNO' file is then to be run through the RUNOFF text formatter that is supplied with the OpenVMS operating system. HTML2RNO understands several HTML tags and tries to convert them to their RUNOFF 'equivalents'. There is, however a fundamental difference: HTML describes the contents and the browser is supposed to decide how the output is rendered (e.g. lists). RUNOFF is a text formatter where the user has a high number of commands available that can be used to control the output. ------------------------------------------------------------------------ The following HTML tags are understood by HTML2RNO which can be mapped quite easily to RUNOFF commands:
+is converted to '.literal' and '.end literal'
starts a new line and puts a '.blank' on it.
Example:
text-1
text-2more-text-1
more-text-2
The resulting output in the '.RNO' file looks like:
Example:
: .literal
:
: text-1
: text-2
: .end literal
: .test page 4
: .literal
: more-text-1
: more-text-2
:
: .end literal
(There are currently superflowous empty lines if one uses and
.)
LINE="data"
inserts 'data' as a separate line into the '.RNO' file.
Example:
This tells RUNOFF that there must be at least 10 free lines on the
current page. If not, RUNOFF starts a new page. A browser has only one
huge 'page' and the user scrolls through that page.
NEWLINE
just starts a new line in the '.RNO' file.
------------------------------------------------------------------------
A test procedure is located in [.VMS.TEST]HTML2RNO-TEST.COM. This file
converts [.VMS.TEST]HTML2RNO-TEST.HTML to [.VMS.TMP]HTML2RNO-TEST.RNO with
[.VMS.TOOLS]HTML2RNO.PY. Then the '.RNO' file is converted to a '.MEM' file
by running the RUNOFF text formatter.
[.VMS.TEST]HTML2RNO-TEST.HTML should contain a test case for each HTML tag
that HTML2RNO.PY understands.
@@ to be enhanced
------------------------------------------------------------------------
(go to: table of contents, Tools in TOC, index)
28-JUL-1998 ZE.