tab2tabl.cgi


tab2tabl.cgi is a program written in Perl that allows you to put a tab-delimted text file on the web as an HTML table. Microsoft Works has the ability to save database and spreadsheet files as tab-delimited files; so, if you need to put a Works database or spreadsheet on the web, this is probably the best way to go.

There is an example below, followed by some rudimentary documentation and a listing of the distribution files. If you use this script on a web site, or you need help getting it to work, send me email. Not that the documentation presented below is sort of sketchy and is only intended to give you an idea of how to use the script; but believe me, it's not that hard.

Examples

To see what the program does, take a look at my Mike's Favorite URLs example.

Documentation

The first thing you have to do to use this script, is go into Works and save your database or spreadsheet as a tab-delimited text file. For details on how to do this, see your Works manual.

Secondly, you have to install the script itself. There is nothing special that needs to be done, other than insuring that the path to Perl at the top of the script is correct ( this varies from system to system ) and changing the value of the directory_thing variable ( email me for details ). If you don't have the ability to install cgi scripts yourself, you may need to have an administrator-type person install the script for you.

Now you have to created a dat file. For each tab-delimited file you are putting on the web, you will have one dat file. The dat file is the configuration file that you give to the script as an argument, and that the script uses to determine which files to use when displaying the tab-delimited file.

The dat file looks something like this:

input_file,/home/smith/www/sample.tab
body_top,/home/smith/www/sample.top
body_bottom,/home/smith/www/sample.bot

First an explanation of the things on the left side of the comma:

input_file is the name of the tab-delimited file you want the script to use.
body_top is the name of the file that contains all of the HTML code you want to appear before the table.
body_bottom is the name of the file that contains all of the HTML code you want to appear after the table.

On the right side of the commas are full paths to the files you want to use. These are NOT the URLs to the files; these are the paths that the operating system of the server uses ( the actual paths, you might say ).

The dat file must be placed in the same directory as the tab2tabl.cgi script. So, if you had to have an administrator type person put the tab2tabl.cgi program into a system-wide cgi-bin directory, you'll have to have her put the dat file into the same directory.

Now, to use the script, you make a call to it from your browser, either directly or as a link in a page, of the form

http://www.server.com/~smith/cgi-bin/tab2tabl.cgi?dat_file=nameofdatfile

where nameofdatfile is the name of the dat file you made from above.

Distribution Files


Works Templates
Works FAQ
Works Web Utils
Books about Works
Works Links
Web Site Help
My Works Home

Please visit our sponsors!

Evidence Eliminator
Totally Eliminate
Secret Data!

Barnes & Noble.com

VanHorn
Web
Services

Hosted by www.Geocities.ws

1