PPWIZARD is a free preprocessor for HTML, REXX, Visual Basic or any text files.
This is a text to HTML #import mode (please
read the #import documentation before trying to understand this section.
This is a recent addition so please consider this import type "beta code"
Sometimes you will wish to simply convert a a number of text
files to a equal number of html files. In this case you will
probably wish to use the /Template
switch and create a template for your background colors, titles, headers
and footers that you require.
TEXT SPECIFIC DEFINITIONS/OPTIONS |
These definitions are specific to the "T2H" import mode. If
you can't understand how they work then I suggest you try using
/debug or #debug to watch what
variables the import uses etc.
- DefineName_BEFORE
These tags are used to set up any tags before the file
is included. By default the font size is decreased and
"<PRE>" (preformated text) mode is set up. Modify or set to
blank (to do nothing) if you wish.
- DefineName_AFTER
These tags are used to set up any tags that are required
after the file is included. This normally undoes anything
you started using the previous define.
- DefineName_BLANK_LINES_TO
When text is processed in "PRE" mode (see above) you want to leave
blank lines as they are. If however you set up the before tags
to be "<P>" and cleared the after tags then you could convert blank
lines to "<P>, in this way a blank line indicates the end of a
paragraph.
- DefineName_ASIS_TAGGING
This option can be used to adjust the conversion of what may be problem characters (such as '<' in HTML). By default
importing does not handle/convert international characters such as umlauts to html symbols but there is nothing preventing you from doing so.
This definition lists zero, one or more names as used on previous "#AsIs SETUP" commands (seperated by whitespace). Clear this definition to prevent all ASIS conversions.
Note that you will probably need to override this value (maybe others as well) if you wished to expand any macros
that the imported data might contain (by default this is not done).
- DefineName_TAB_CHAR
Normally tabs are ignored by the import process. This variable allows you to replace them with something else.
- DefineName_HTTP_LINK
The import mode looks for "http:" type web addresses and
by default converts the URL into a hypertext link. You may not
wish this so you could clear this variable. You might wish to
simply highlight the URL.
- DefineName_FTP_LINK
The import mode looks for "ftp:" type ftp addresses and
by default converts the URL into a hypertext link. Otherwise as
per the "_HTTP_LINK" option.
- DefineName_RECORD_FILTER
This option allows you to modify records before they are
written to the intermediate file for processing. The value
you supply for this option is a rexx
expression that can be
interpreted. You could use this to simply drop lines or the data
can be modified by you.
The following
rexx variables are relevant:
- DefineName_PROTECT_START
By default will be set to the value
<?ProtectFromPpwStart>.
If you have filter code that wants to generate PPWIZARD commands
then you will need to override this value. Have a look at the
multiple HTML pages
example.
- DefineName_PROTECT_END
By default will be set to the value
<?ProtectFromPpwEnd>.
This example imports a file and also extends the translation it will
perform to include 2 international characters. For no real reason we will
also prevent email addresses becoming "mailto" links and simply highlight
email addresses in a different color.
;--- Save current Autotag state, set up international conversion, restore state ---
#AutoTagState +
#AutoTag 'ä' 'ä'
#AutoTag 'ë' 'ë' ;;Only 2 for this example
#AsIs SETUP INTERNATIONAL_SYMBOLS
#AutoTagState -
;--- Update option so as to use the international chars as well as usual conversions -
#define T2H_ASIS_TAGGING IMPORT_HTML_BASIC \
IMPORT_HTML_BOXGRAPHIC_TO_BOXTEXT \
INTERNATIONAL_SYMBOLS
;--- Simply for demonstrate puroses, remove email links and make "olive" ---
#define T2H_MAILTO_LINK <FONT COLOR=OLIVE>{$Url}</FONT>
;--- Import the text file ---
#import README.TXT T2H ""
PPWIZARD Manual

Thursday January 17 2002 at 6:27pm