
            *** Now with support for 7++ See below +++

              Text to HyperText server for WinPack.
              -------------------------------------

What it Does
------------

Cnv2html allows you to convert plain text messages and bulletins  into 
HTML.

Cnv2html looks at the title field of an outgoing message, if it  finds 
the trigger keyword  ^.htm  anywhere in the title, the message will be 
converted.

Cnv2html  works  by using templates, you are free to design  your  own 
templates, a few samples have been included.

Templates  should  be stored in the \WINPACK\TEMPLATE  directory,  and 
named from BLANK00.HTM to BLANK59.HTM

Unless  a template is forced, it will be chosen randomly  at  transmit 
time, the more templates you have, the less chance you have of sending 
the same one each time.

INSTALLATION
------------

To Install this program, go into the \WINPACK subdirectory, and create 
a directory called TEMPLATE.

Copy the supplied sample templates into this directory.

The supplied templates are called BLANK01.HTM BLANK15.HTM BLANK30.HTM 
BLANK45.HTM etc

Copy the program called CNV2HTML.EXE into the subdirectory called 
\WINPACK\SERVERS\SEND\

You can now send HTML messages anytime you wish.

If you want an outgoing message or bulletin to be converted into  HTML 
just end the subject with ^.htm and the message will be converted when 
it is transmitted.

That's  all  their  is to it, later on you may  wish  to  design  some 
additional templates of your own.

Templates  should  be  numbered from BLANK00.HTM  to  BLANK59.HTM  the 
server will select one based on the time in seconds that it springs to 
life,  if you only have 4 templates call them BLANK01.HTM  BLANK15.HTM 
BLANK30.HTM  BLANK45.HTM and not BLANK01.HTM  BLANK02.HTM  BLANK03.HTM 
BLANK04.HTM if you do this you will not get a truly random choice !

When  you create templates, put WinPack Tokens where you wish text  to 
be inserted by the server as follows.

$MYCALL     inserts your callsign
$1STNAME    inserts your first name
$2NDNAME    inserts your second name
$QTH        inserts your QTH
$QRA        inserts your QRA
$WAB        inserts your WAB
$BBS        inserts your home BBS
$VERSION    inserts the WinPack software version
$YYYY       inserts the year 1989
$YY         inserts the year 89
$MMM        inserts the month Dec
$MM         inserts the month 12
$DD         inserts the date  31
$HH         inserts the hour  17
$NN         inserts the minute 15
$SS         inserts the second 59
$TYPE       inserts Bulletin or Personal
$TO         inserts to Callsign
$ADDRESS    inserts destination BBS
$SUBJECT    inserts subject or title of message
$MID        inserts bid
$TEXT       inserts full text of message
$DATA       same as $TEXT but for scrolling text area templates
$TEMPLATE   inserts the name of the template being used

In addition to the above "Tokens" you can now design and add your own, 
a "Token" can be any name of up to 8 letters, starting with a "$"

For example you might want to call a "Token" "$JAVA1"

If  you  put the word $JAVA1 in your template, Cnv2html will  look  in 
your TEMPLATE directory for a file called JAVA1.CNV

If  it  finds  JAVA1.CNV  it's contents will  be  inserted  into  your 
template.

Using  the  above then, you could easily use the new WinPack  6.4  tag 
line  feature  to  insert file request tag lines into  all  your  HTML 
templates.

Simply put into all your HTML templates the word  $TAGLINE

Then  using  a text editor, create a file called TAGLINE.CNV  in  your 
TEMPLATE directory as shown below...

<CENTER> Click here to request File </CENTER>
<CENTER> <TABLE Border=6 CELLPADDING=7 BGCOLOR="#FF0000"><TR><TD>
<A HREF="ax25mail: To='gw3tmh@gb7oar' Title='/REQFIL CNV2HTML.ZIP'">
<FONT COLOR="#00FF00">Latest Version of Cnv2html
</FONT></TD></TR></TABLE></CENTER>

The above box will then be added to all your HTML messages at transmit 
time, and simply changing the one file above, could therefore be  used 
to change the contents in all sixty of your templates.

Optional Config File
--------------------

The above instructions give you enough information for a basic  setup, 
you can change many of the settings in Cnv2html by use of an  optional 
config file.

The  config  file is called  CNV2HTML.INI  and is placed in  the  same 
directory as  CNV2HTML.EXE

The  config file has two sections, again these are optional,  you  can 
have section one only, section two only, or both sections.

A  very basic config file could just contain a list of  callsigns  and 
topics.

[G0FUM]
[G1NNB]
[G4IDE]
[G4YUU]
[G4YWL]
[GM4WZL]
[GW3TMH]
[M0AWB]
[MM1BRH]
[HTML]

Now  when you send a message using WinPack, if the 'to' field  of  the 
message  matches any of the above the message will be  converted  into 
HTML, you don't need to bother about the ^.htm trigger.

If however you prefer to have a list of topics that are not  converted 
start the config file with...

[SETUP]
CONVERT=NO
[G0FUM]
[G1NNB]
[G4IDE]

Now  messages  to  the listed topics will not  convert  to  HTML,  but 
messages to any topics not listed will.

If you have a config file that only contains

[SETUP]
CONVERT=NO

and  no callsigns or topics listed, everything will convert  to  HTML, 
you can override this by putting  ^.txt  into the subject field of  an 
outgoing message.

However this is probably not a good idea.

Note that any of the config instructions can go anywhere in the config 
file, so you could have for example...

[SETUP]
CONVERT=YES
[G0FUM]
[G1NNB]
CONVERT=NO
[G4IDE]
[G4YUU]

Now  the server defaults to converting messages to html if they  match 
any of the above entries, except for G1NNB, messages to G1NNB will not 
convert to HTML.

Other options
-------------

The above is a rather trivial example, more useful commands are listed 
below,  again they can go anywhere in the config file, so they can  go 
after  the  word [SETUP] to be the default setting, and  can  also  go 
after  a particular callsign or topic to change the settings for  that 
one entry only.

CONVERT=YES

Convert anything to HTML if it matches any of the entries found in the
config file.

CONVERT=NO

Convert anything to HTML if it doesn't match any of the entries in the
config file.

TRIGGER=YES

Show the ^.htm trigger word at the end of the message title.

TRIGGER=NO

Don't show the ^.htm trigger word at the end of the message title.

SYSTEM=YES

Send  a system message back to WinPack giving details of the  template 
used.

SYSTEM=NO

Do not send a system message back to WinPack.

COPY=YES

Send a full HTML copy of the converted message back to WinPack.

COPY=NO

Do not send a copy of the HTML message back to WinPack.

ASCII=YES

If  it's a bulletin that has been converted to HTML, also send a  copy 
out in plain text.

ASCII=NO

Do not send a plain text copy as well as a HTML copy.

NOTE The ASCII command ONLY works on bulletins.

NEWLINE=YES

Print a <BR> after each newline in the text.

NEWLINE=NO

Do not print a <BR> after each newline in the text.

PARAGRAPH=YES

Print a <P> and </P> at each new paragraph.

PARAGRAPH=NO

Do not mark each new paragraph with a <P> </P> pair.

Finally  you  can  force a particular template to  be  used  with  the 
template command, followed by the template to use.

TEMPLATE=BLANK50.HTM

            -----------------------------------------------

7++ Support !
-------------

This is an experimental feature.
---------------------------------

Useful even if you never use HTML...

If you have installed my REQDIR replacement server (any version)  when 
you  send  a  7plus file, Cnv2html will see if there is  an  entry  in 
FILENAME.LST for the 7plus file you are sending out.

If  their  is,  this  information  is  used  to  create  a  7++  style 
information file, that is hopefully compatible with the FBB 7++ server 
written by IK6PYS.

A WinPack 7++ recovery server is available called JANITOR.

What  Janitor  does, is attempt to place the 7+ file  into  a  similar 
subdirectory to the one it originated from, along with a one line text
label saying what the program does.

For  more  info  see the documentation supplied with  7++  written  by 
IK6PYS, and the documentation supplied with Janitor.

                  --------------------------------


2HTMLIB Support
---------------

Cnv2html   now  tries  to  make  use  of  the  HTMSTORE  and   7DECODE 
subdirectories, when you send a HTML message using HTML.

When you send a HTML message using Cnv2html, the outgoing template  is 
scanned for sound and image files.

If an image is found, Cnv2html then searches on the hard drive in  the 
following directories.

HTMLIB, HTMLMID, HTMSTORE, 7DECODE, if it finds the required image  in 
7DECODE  or HTMSTORE, it will automatically be moved into the  correct 
subdirectory.

Also  a text file called HTMLIB.LOG or HTMLMID.LOG is  updated  giving 
the date the image was used.

This is useful for removing images that have remained unused for  some 
time.
 
packet:  gw3tmh@gb7oar.#16.gbr.eu
email:   gw3tmh@gb7abc.freeserve.co.uk
website: www.gb7abc.freeserve.co.uk


