
 !CSV2Web 1.13 (24-03-97)
 
 Written by Tim 'Mit' Wiser


 [This text looks best loaded into StrongED with the width set to 100]

 
Whilst designing my internet web home page I decided to include a catalogue of
my music collection.  In a roundabout way I found a need to convert a CSV
database into an HTML table. I just couldn't be bothered to go through the CSV
data and insert HTML tags, remove commas and quotation marks. Call me lazy.
I do.
 
This application was therefore written by me to save me some time. It converts
a CSV database into an HTML 3.0 table that can be viewed with any web browser
that understands HTML 3.0. I use Netscape 'cause I'm at uni and use PCs and
Suns to get to the internet.  However, you can use Fresco which understands
tables on Acorn machines.  The code that is produced has been tested with
Netscape 2, 3 and Fresco.

CSV2Web supports various HTML extensions that are supported by Microsoft
Internet Explorer and versions of Netscape from version 2 onwards.  It will
also add hyperlinks to pages referenced in CSV files automatically, has support
for positioning of captions, alignment of data and toggling of wrapping in the
table.
 

Using the program
~~~~~~~~~~~~~~~~~
Double click on the !CSV2Web icon and it will install on the iconbar.

Click on the icon to open the main window where you can set the border width
(to 0 for no border) as well as the cellspacing and cellpadding. If you want
all the columns aligned (left, right, full, center) then set this accordingly.
If you want a character to be ignored then set this option as well.  This
option is used to define the format of the CSV data.  For example, if your data
is separated by "," thus:

   "Size","Colour"
   "Large","Red"                 (have a look inside !CSV2Web.CSVfiles)
   "Medium","Green"
   "Small","Blue

Then you would tell CSV2Web to ignore the " character and that the data is
separated by commas. Use the menu (click the middle mouse button) to set the
comma.

To convert the data just drag your CSV file onto the window and then drag the
HTML icon to a directory viewer. After a short delay - no more than a second
for tables of good size - your HTML code will be produced and is ready for
cutting and pasting into your web page.


Intelligent operation
~~~~~~~~~~~~~~~~~~~~~

This is a rather cunning (or at least I think it is) option which can be very
useful indeed.  Take a look at this data:

 "Name","Format"
 "Head lights, white lines, black tar rivers","CD album"

You should tell CSV2Web to ignore quotation marks and that the data format is
comma-separated. However, within the name of the album there appears a comma.
If you went ahead and loaded the HTML code into a browser you'd find an
incorrect table, with the title split up over three cells.  If you had the
intelligent option switched on this would not happen. The moral is: Leave the
intelligent option switched on!


Loading and saving your settings
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

You can save your settings by choosing Settings->Save from the menu.
You can reload your settings by choosing Settings->Load from the menu.
You can return to some recommended defaults by choosing Settings->Default


Producing a standalone web page
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

This program will produce a simple but effective web page if you ask it to by
checking the applicable box in the main window. Try it and see what code it
produces. At the bottom of the web page is contact information. You can change
the info that appears in this footer by selecting the 'Set owner' entry in the
Options menu.  Click "Set" to save the changes.


Versions
~~~~~~~~

For a list of the progress of this program, consult the 'Updates' file inside !CSV2Web.

1.00  Released many many months ago during 1996.
1.10  Released on 28th February 1997.
1.11  Released on 3rd March 1997.
1.12  Released on 18th March 1997.
1.13  Released on 24th March 1997.

All versions are StrongARM compatible and require RISCOS 3 to run.

I've tested the window templates with 12pt Homerton Medium and they look good.
Therefore you should have no problems with disappearing text using RISCOS 3.5
and onwards.


Defining colours accurately
~~~~~~~~~~~~~~~~~~~~~~~~~~~

Common colours are hardcoded into most web browsers, though you can define your
own colours if you want more control over how your page appears.  To do this,
simply pop up the colour menu, open the 'Other' submenu at the bottom and type
in the definition of your colour.  You can use either hexadecimal notation (eg.
FFFFFF) or type in integer values for red, green and blue components (eg. 255,0,
0 for bright red).  Integer values will be converted into hex and shown in the
main window when you press Enter.


Convert and Cancel buttons
~~~~~~~~~~~~~~~~~~~~~~~~~~

You may have noticed that the 'Convert' and 'Cancel' buttons are missing off
the bottom of the main window.  This is because I didn't use them very often,
prefering to use the menu system of saving files instead.  However, if you
don't think this is as nice, and would like the two buttons back again, then
you can get them back by loading a template editor, loading the templates into
the editor and performing the following actions:

a) Make the main window deeper by increasing the Y size (you may have to add
some slider bars onto the main window in order to actually resize the window to
the larger size).

b) Add a close icon to the xfer_send window
c) Remove the slider bars (if applicable, see point A)



Active URLs
~~~~~~~~~~~

CSV2Web will add a hyperlink to a web page if a URL is found in the CSV data. For example, if the 
following line was in your CSV file..

   "Tim Wiser","http://www.cowgate.demon.co.uk"

..then the resulting table code would have the code to turn that address into a hyperlink..

   <tr><td>Tim Wiser</td><td><a href="http://www.cow.....</a></td></tr>

Note that the http: must be in lower case. If you mix cases, or use only upper
case then the URL will NOT be found.  It's convention to write the transport
protocol in lower case anyway, so stick to rules and you'll be fine. For URLs
to be added in hyperlink form you must have the 'Active URLs' option ticked in
the Options menu.


Known problems
~~~~~~~~~~~~~~

This version of the software has not been thoroughly tested. All in all, it
seems pretty stable and any bugs that occur are not fatal.  If you get a file
error, and then "File open" errors afterwards simply go to the command line,
type 'SHUT' and press Enter (and Enter again if you're on the CLI).

   - Direct RAM file transfers don't work properly
   - The 'Format' menu is dodgy (grey area, this)
   - The menus don't stay open on an ADJUST-click



Notes
~~~~~

Do not try to edit the templates to use outline fonts.  The program will not
accept them if they use these fonts.  Needless to say, if you really want
outline fonts on the window, the Risc PC and A7000 will do the trick, and so
will the various force-RISCOS-to-use-outline-fonts-everywhere utilities.


Thanks
~~~~~~
Thanks to everyone I know who puts up with me and my problems. Thanks to Henry
Morgan who contacted me wanting a newer version of this application and helped
out with the ADJUST menu problem. A big shout out to Jenny Preece for help with
HTML coding and also to Phil Norman, author of the excellent Dicottery
application which I use to compress this program for release. Thanks also go to
Andrew Black and David McCormack for their HTML mode for StrongED which I
lifted all the character HTML definitions from. Thanks to Corinne Brown for
trying her best and everyone on IRC #acorn and #argonet for banarl chitchat and
help.

Also available! An Ovation Pro to HTML document converter!!
http://www.cowgate.demon.co.uk/acorn/binaries/ovp2html.arc



If you want to contact me
~~~~~~~~~~~~~~~~~~~~~~~~~
I would appreciate any comments you have regarding this program. So, if you
find any bugs (likely) or would like anything added then please write!

 The latest version of this program can usually be found on the Internet
 at http://www.cowgate.demon.co.uk/acorn/apps/csv2web/

Note that the program archive MAY have an extension like 112,113 etc on the end
of it. If you're using Netscape to download the file and you find that the screen is filled with junk, try setting the 'Save to disc' option or holding
down SHIFT as you click on the hypertext download link.

Please use e-mail when trying to contact me as it's (usually) free for me to
use it for correspondance.
 

 Tim Wiser                       Tim Wiser
 18 James Street                 Cowgate Cottage
 Off Cowley Road                 Lea Road
 Oxford OX4 1ET                  Lea Bridge
                                 Derbyshire DE4 5JL

 (+44) 01629 534537              (+44) 01865 792 861


 World wide web homepage http://www.cowgate.demon.co.uk/mit/
 Electronic mail mit@beer.com
 Telnet toth.oaktree.co.uk

 The Oxford address is cool until the end of June 1997.


 Until next time.




Mit, 24-03-97

