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

              Text to HyperText server for WinPack.
              -------------------------------------
                  Update Version February 1999
                  ----------------------------

                   Written by G4YUU and GW3TMH

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: at the start or :HTM at the end of the  title
then  the  message  will  be  converted. See the file Cnv2html.ini for
extra  information.  It  is advisable to always use the Trigger in the
Title as a courtesy to Sysops and Readers of Bulletins.

It  is better to start the title with HTM: rather than putting :HTM at
the end, as with long titles the :HTM at the end can get lost when you
reply  to the sender, and RE: gets placed at the start of the title by
WinPack.

Cnv2html  works  by using Templates. You are free to design  your  own 
templates,   a  few  samples  have been included. More are   available 
from my WEB site:-

www.gb7abc.freeserve.co.uk

There are also many of my other programs for Packet Radio for use with 
the WinPack Packet program written by Roger Barker G4IDE. 

Templates  should  be stored in the C:\WINPACK\TEMPLATE directory, and 
named from BLANK000.HTM to BLANK999.HTM

Unless   a  template  is forced, it will be chosen as the next one  in 
the series at transmit time, when the last template in the series  has 
been used, it starts again at blank000.htm.

The  more templates you have, the less chance you have of sending  the 
same Template each time.

Please  note that the number of Templates must never exceed the Number
999, and should be numbered consecutively with no gaps.

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

To  Install this program, go into the C:\WINPACK Directory, and create 
a subdirectory called \TEMPLATE. i,e, C:\WINPACK\TEMPLATE.

Copy the supplied sample templates into this directory.

The  supplied  templates  have been randomly chosen from the set, each 
one illustrates a different style of very simple template.

Copy  the  program  called  CNV2HTML.EXE  into the subdirectory called 
C:\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  start  the  TITLE  with HTM: or end it with :HTM and the message
will be converted when it is transmitted.

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

Templates  should  be  numbered  from  BLANK000.HTM to BLANK999.HTM. 

The server  will select one each time it is run, until it reaches  the 
last one, it then starts again at template 000.

If  you  only have 4 templates call them  BLANK000.HTM,  BLANK001.HTM, 
BLANK002.HTM, and BLANK003.HTM.

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 1998
$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.

The  above Tokens will pick up your details from the  Options/Personal 
section of Winpack and insert them into your created Template.

The latest version of Winpack is 6.42 

Another example.

Simply put into your HTML templates the word $REQUEST

Then using a text editor, create a file called REQUEST.CNV as shown 
below and place the REQUEST.CNV in your \TEMPLATE subdirectory.

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

This  will then Reqfil the stated .ZIP file from  your  C:\WINPACK\PUB 
subdirectory.

The above box will then be added to all your HTML messages at transmit 
time,  and simply adding the one Tokenized file $REQUEST as  above  to 
your   Template,  could  be  used  to  REQFIL  any  file   from   your 
C:\WINPACK\PUB DIRECTORY. 


Optional Config File ( Cnv2html.ini )
-------------------------------------

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 Cnv2html.ini file could just contain a list of Call-Signs 
and topics.

[SETUP]
CONVERT=YES
[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 Call-Signs or the  FIELD  HTML  the 
message will be converted  into HTML.

If however you prefer to have a list of topics that are not  converted 
type in the Cnv2html.ini file...

[SETUP]
CONVERT=NO
[G0FUM]
[G1NNB]
[G4IDE]
[WINPAC]
[WIN98]
[WIN95]
[HELP]

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

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

The above is a rather trivial example, more useful commands are listed 
below,  again they can go anywhere in the Conv2html.ini 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.

[SETUP]
CONVERT=YES

Convert anything to HTML if it matches any of the entries found listed
under CONVERT=YES.

[SETUP]
CONVERT=NO

Do not Convert anything to HTML when listed under CONVERT=NO.

TRIGGER=YES

Show the HTM: trigger at the start of the message title.

TRIGGER=NO

Do NOT show the HTM: trigger at the start 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.

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> at the beginning of the Paragraph and </P> at the end  of 
each new paragraph.

PARAGRAPH=NO

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

MODE=nn

MODE=0 Convert a message to HTML
MODE=1 Convert a message to HTML, and send a plain text copy next day.
MODE=2 Convert a message to HTML, and append to a plain text copy.
MODE=3 Experimental mode, needs Janitor 1-E to decode.

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

TEMPLATE=BLANK500.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  there  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, HTMLWAV, 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 
sometime.


SWAP.CNV The optional swap file.
--------------------------------

You  can  now  have a file called SWAP.CNV in the  same  directory  as 
Cnv2html.

Swap.cnv has a very simple layout, a word starting with a period "." a 
space, then the substitution string.

A sample swap.cnv is enclosed.

You can use swap.cnv to insert images and font changes whilst actually 
typing a message.

Print out swap.cnv and keep it for reference.

You  will see for example, that if you type .g* you will  insert  into 
your html page a gold star.

How you enter a dot command is very important.

A dot command must start with a newline and end with a newline.

If you want to insert two gold starts you must type

.g*

.g*

and not...

.g*
.g*

in addition to the dot commands in swap.cnv, four more are built  into 
Cnv2html, they are... .TEMPLATE, .MODE, .HTML, .TXT

Which can be used to OVERRIDE all other settings.

So you could start a message as...

.TEMPLATE=BLANK000.HTM

To force that template to be used.

.MODE=0 

To force mode 0, see below

.HTML

To force a conversion to HTML

.TXT

To prevent a conversion to HTML


MODES
-----

Cnv2html has 4 modes of operation.

.MODE=0 Converts messages to HTML
.MODE=1 Converts messages to HTML, and send plain text copy next day.
.MODE=2 Converts messages to HTML, and appends to a plain text copy.
.MODE=3 Experimental mode, needs Janitor 1-E to decode.

Further info:-
 
Packet:  gw3tmh@gb7oar.#16.gbr.eu
Email:   gw3tmh@gb7abc.freeserve.co.uk
Website: www.gb7abc.freeserve.co.uk

Written by Ken GW3TMH

Edited by John G4YUU
Email: john.g4yuu@lineone.net
Packet: G4YUU@GB7SUT.#29.GBR.EU
