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

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

Cnv2html is written in "C" for maximum speed, and small code size.

Note that it is a "Windows" program, not a dos program.
                                       
+++ Changes in this version. +++

***Wordstar type commands now supported.
***HTML and plain text can now be combined in the same message.

***Cnv2html now looks for "HTM:" and ":HTM" in the subject
of a message.

If  an incoming message contains one of the above trigger  words,  and 
you  use the winpack "reply to sender button", the reply will in  most 
cases be converted to HTML.

***4 Modes of operation.

Mode 0 converts messages to HTML
Mode 1 converts messages to HTML and sends a second plain text copy.
Mode 2 sends a plain text message, and appends a html copy.
Mode 3 still experimental sends plain text and an empty template

***The ^.txt trigger is now removed from plain text copies.

***Images and comands can now be inserted whilst typing.
   
Cnv2html contains the following servers built in...

LIBRARIAN   for HTML Library support
7++         for IK6PYS compatible file re-location
CNV2HTML    for HTML convertion
 
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.

Section  1 starts with the word [SETUP] and allows you to  define  the 
default settings that apply to all messages.

Section  2  contains a list of callsigns and bulletin to  fields,  any 
settings put after a callsign, apply to that callsign only.

Below is a sample config file with comments.

; CNV2HTML.INI put in \winpack\servers\send along with CNV2HTML.EXE
;
; This file is optional, if it does not exist messages will only be
; converted to HTML if the  ^.htm  keyword exists in the subject.
;
; If this file exists it is checked to see if the "to" field of the
; message matches any of the entries below.
;
; Default settings for everybody.
[SETUP]
;
CONVERT=YES  
;
; The CONVERT flag, if this is set to YES, convert anything to HTML
; if the "to" field matches any of the entries below.
;
; If CONVERT=NO then do the opposite, ONLY convert messages that
; don't match the "to" field shown below
;
;
TRIGGER=YES
;
; The TRIGGER flag, if this is set to YES, show HTM: in the
; subject of the message.
; Note that MODE 2 HTML will not show a trigger, as it is plain
; text and HTML in the same message.
;
;
SYSTEM=NO
;
; System message, if SYSTEM=YES send a system message to WinPack
; Giving details of the template used.
;
;
COPY=YES
;
; The copy flag, if COPY=YES send a full HTML copy of the converted
; message back to WinPack.
; At present you cannot get a copy when using MODE 3
;
;
MODE=0
;
; This replaces the old ASCII flag, at present there are the
; following modes.
; MODE=0 Sends a HTML message.
; MODE=1 Sends a HTML message, and 24 hours later a plain text copy
; Mode=2 Sends a plain text message with a HTML message appended.
; Mode=3 Sends a plain text message, and an appended empty template.
; Note that MODE 2 only works on bulletins.
; Mode 3 requires special software at the receiving station to
; re-build the html page.
;
;
NEWLINE=NO
;
; The NEWLINE flag, if NEWLINE=YES add a <BR> to each line.
;
;
PARAGRAPH=YES
;
; The PARAGRAPH flag, if PARAGRAPH=YES add a <P> at each paragraph.
:
; Optionally you can add s list of Call signs here, Cnv2html can then
; be configured to always convert mail or Bulls to the call sign or
; Topic below if CONVERT=YES
;
; If CONVERT=NO then messages are converted if they don't match any
; of the call signs below.
;
;
QUOTE=#FF0000
;
; The QUOTE flag sets the colour used on lines that start with >
;
;
7PLUS=YES
;
; The 7PLUS flag is used to enable support for 7++ to enable
; automatic re-location of winpack files, the receiving station
; needs special compatible software, such as Janitor.
;
;
; Convert mail to GW3TMH
; [GW3TMH]
;
; You can put the name of a Template here. In this example a message
; sent to GW3TMH would be forced to use the Template called TEST.HTM
; which is useful for Debugging Templates
;
; TEMPLATE=TEST.HTM
;
; Convert to HTML messages to the following
;
[G7SPT]
[M1CGP]
[GM0JQE]
[VK5KMG]
[2E1GEU]
[2E1FDD]
[PA3GWB]
[SM7WDL]
[G7EVW]
[G1SSO]
[G7OAE]
[G6ODT]
[G0FUM]
[G3WXI]
[G4ZJL]
[G0MOD]
[G4GUN]
[G4FJQ]
[ZL2AGW]
[M1CDU]
[G3ZXN]
[G8MZX]
[G4IDE]
[G4YUU]
[G4VWL]
[G6KUI]
[G7OCW]
[G7WFC]
[GM4WZL]
[GW3TMH]
[2E1FXN]
[G3WAG]
[M0AWB]
[M0BOV]
[M1AFN]
[MM0BQM]
[G0OPA]
;
; Don't convert mail to G1NNB
[G1NNB]
CONVERT=NO
; 
;
; Send Convert message to the HTML Field as CONVERT=YES is already
; SET
;
[HTML]
;
;
; Send plain ASCII copy of everything sent to WINPAC
;
[WINPAC]
MODE=1
;
;
; Send a double message, plain text and HTML combined to
; the HELP field.
[HELP]
MODE=2
;
;



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

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.

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.

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

WORDSTAR Support
----------------

Cnv2html now supports the use of wordstar like commands, when you  are 
typing  a message, any line that starts in a period, (a full stop)  is 
assumed to be a command.

Cnv2html  then  looks  for  a  file  called  "SWAP.CNV"  in  the  same 
subdirectory as the Cnv2html program.

If it finds this file, it scans through it looking for the command you 
entered,  and  replaces the command word with the swap  entry  in  the 
table.

So if you typed for example...

.big

Cnv2html will look in SWAP.CNV...
find  .big and replace it with  <font size=8>

You  can  have as many entries in SWAP.CNV as you wish,  there  is  no 
limit.

To  use  the commands that are in swap.cnv when you  are  typing,  hit 
return, then enter a fullstop and the comand, then hit return again.

Failing  to  hit return after the command may  lead  to  unpredictable 
results.

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

Templates
---------

Their are four sample templates included.

Blank00.htm is a very simple design.

Blank15.htm  is  an  example  of a two  part  template,  the  template 
consists  of  blank15.htm  and getfile.cnv, both have  to  be  in  the 
template directory, and they are built into a single page at  transmit 
time.

Blank30.htm is an example of a web page style of template.

Blank45.htm is an example of a scrolling window style of template.

73's have fun, Ken Williams GW3TMH.

packet:  gw3tmh@gb7oar.#16.gbr.eu
email:   gw3tmh@gb7abc.freeserve.co.uk
website: www.gb7abc.freeserve.co.uk




