Contents


1 Introduction
2 Installation
3 How AscToTab works
4 Running AscToTab

4.1 Execution from a command line
4.2 Drag'n'Drop execution
4.3 Refining your results

5 HTML markup produced

5.1 <TABLE> statement

5.1.1 BORDER=n attribute
5.1.2 CELLPADDING=n attribute
5.1.3 CELLPADDING=n attribute
5.1.4 BGCOLOR="colour" and BORDERCOLOR="colour" attributes

5.2 <CAPTION> statement
5.3 <TH> statements
5.4 <TD> statements

6 Customising your conversions

6.1 Policy files
6.2 Preprocessor commands

6.2.1 The BORDER command
6.2.2 The CELLSPACING and CELLPADDING commands
6.2.3 The BGCOLOR and BORDERCOLOR commands
6.2.4 The CAPTION command
6.2.5 The HEADING_ROWS command
6.2.6 The HEADING_COLS command

7 Purchasing AscToTab

7.1 How do I purchase AscToTab (trick question)?

8 Contacts on the Web

8.1 The home page
8.2 E-mail
8.3 Support

9 Known problems
10 Change History

10.1 Version 1.00 (December '97)



1 Introduction

AscToTab is a specific ASCII to HTML conversion tool. It converts plain text files to HTML tables.

AscToTab has evolved out of the technology used in AscToHTM, the general-purpose text to HTML conversion utility. The AscToTab technology will form a subset of AscToHTM in later releases.

The HTML version of this document has been produced using AscToHTM, and no post-processing has been done to the HTML pages produced. It has been generated from a single source document and a few small configuration files.

This document describes AscToTab V1.0, which is available as postcardware from December 1997. AscToHTM is available as shareware. It's likely that any later versions of AscToTab may also become shareware.

AscToTab is made available for download via the Internet from here.


2 Installation

AscToTab is downloadable as a .ZIP file from here. You should download the version best suited to your needs.

Once downloaded, simply unzip the files and move them to a suitable location.

AscToTab V1.0 runs as a console application ("DOS program") under Windows, and from the command line under OpenVMS.


3 How AscToTab works

AscToTab looks at the layout of your text file and tries to spot the column boundaries in your table. It doesn't require comma- or tab-delimited values - though it may additionally support these in later versions.

Having detected your column positions, it attempts to detect if your table has a header.

Finally it outputs your table, paying attention to the following

In addition to it's automatic features, AscToTab can be customised to give even better output. See Section 6 for details.


4 Running AscToTab

4.1 Execution from a command line

From a command prompt (Windows or OpenVMS) you can type

AscToTab <textfile> [<policy file>]

Where

<textfile>

Name of file to be converted. The output will be the same name with a ".html" extension

If the <textfile> is of the form "@<filename>", then AscToTab will read the file <filename> line-by-line and convert the files listed in that file.

and

<policyfile>

Is a "policy" file used to customise the conversion see 6.1.



4.2 Drag'n'Drop execution

Create an Icon for AscToTab and simply drag'n'drop files onto it. The results will be identical to those obtained by typing in the filenames as described in 4.1.


4.3 Refining your results

If all goes well the resultant HTML will be satisfactory. However, you can customize the conversion in two ways:-

5 HTML markup produced

5.1 <TABLE> statement

5.1.1 BORDER=n attribute

AscToTab will default to a BORDER=2 unless

  1. A BORDER preprocessor command is encountered (see 6.2.1)

  2. It determines that the user has added their own lines


5.1.2 CELLPADDING=n attribute

AscToTab will only add CELLSPACING if a CELLSPACING preprocessor command is encountered (see 6.2.2).


5.1.3 CELLPADDING=n attribute

AscToTab will add CELLPADDING if:-

  1. It enounters a CELLPADDING command (see 6.2.2)

  2. A BORDER is present. The default is CELLPADDING=4


5.1.4 BGCOLOR="colour" and BORDERCOLOR="colour" attributes

AscToTab will add these attributes is it encounters BGCOLOR or BORDERCOLOR commands (see 6.2.3).


5.2 <CAPTION> statement

AscToTab will add a caption if it encounters a CAPTION command (see 6.2.4)


5.3 <TH> statements

AscToTab will use <TH>..</TH> markup whenever it determines that a cell forms part of the header.

AscToTab will attempt to automatically detect headers by looking for a single separator line near the top of the file.

Alternatively the HEADING_ROWS command (see 6.2.5) will be used to specify the number of header lines.

AscToTab will set the ALIGN and COLSPAN attributes as best it can.


5.4 <TD> statements

AscToTab will use <TD>..</TD> markup for most of the cells in the table.

If the HEADING_COLS command (see 6.2.6) is encountered, the first few columns will additionally use <STRONG>...</STRONG> markup.

AscToTab will set the ALIGN and COLSPAN attributes as best it can.


6 Customising your conversions

6.1 Policy files

Policy files are an AscToHTM feature that may be added to later versions of AscToTab.

They are not available in AscToTab V1.0.


6.2 Preprocessor commands

The preprocessor is a feature shared with AscToHTM. Essentially you insert commands into your source file that tell AscToHTM how you want various aspects of your file converted.

The preprocessor looks for lines that begin with a special character sequence "$_$_". All the AscToTab commands add "TABLE_" to this, making the relevant prefix "$_$_TABLE_". This sequence must appear at the start of the source line with no leading white space. Each command must be wholly contained on a separate line.

Command are best placed at the top of the source file.

6.2.1 The BORDER command

      $_$_TABLE_BORDER 5
This command specifies the BORDER attribute. A value of 0 means "none".


6.2.2 The CELLSPACING and CELLPADDING commands

      $_$_TABLE_CELLSPACING 5
      $_$_TABLE_CELLPADDING 5
These command specify the values of the CELLSPACING and CELLPADDING attribute.

A value of 0 means "none".


6.2.3 The BGCOLOR and BORDERCOLOR commands

      $_$_TABLE_BGCOLOR         AntiqueWhite
      $_$_TABLE_BORDERCOLOR     #FF2345
These commands sepcify the values of the BGCOLOR and BORDERCOLOR attributes.


6.2.4 The CAPTION command

      $_$_TABLE_CAPTION         Ooo! what a pretty table
This command specifies the value of <CAPTION>...</CAPTION> markup to be added to the table.


6.2.5 The HEADING_ROWS command

      $_$_TABLE_HEADING_ROWS 4
This command tells AscToTab how many lines of text are to be treated as part of the header. This should be the number of lines as it appears in the source file, including any blank lines.


6.2.6 The HEADING_COLS command

      $_$_TABLE_HEADING_COLS 1
This command tells AscToTab how many columns (if any) at the start of each line should be marked up in <STRONG>...</STRONG> markup.


7 Purchasing AscToTab

7.1 How do I purchase AscToTab (trick question)?

You don't. It's free. Or rather Version 1.0 is postcardware, later versions may become shareware priced at around £5 or $10.

It you really like the program, send a postcard to

John A Fotheringham
c/o Yezerski Roper
Applicon House
Exchange Street
Stockport
SK3 0ET

UK

If you really, really like the program, send cash to encourage further development.

You could also look at AscToHTM, which shares the same technology, and will include AscToTab. AscToHTM is shareware in the Windows version.


8 Contacts on the Web

8.1 The home page

At time of writing Yezerski Roper (whom I work for) have graciously allowed me to give AscToTab and AscToHTM a home page.

Yezerski Roper are the most intelligent software house it's ever been my privilege to be associated with. We're based in the UK and offer OpenVMS and Windows NT systems, and are currently developing state-of-the-art products which will allow companies to exploit the full communications potential of the Internet.

Oh yeah... and they pay me as well :)

AscToTab and AscToHTM are "hobbies".

If you have problems locating the home page and suspect it has moved, go to AltaVista and enter

+"John A Fotheringham" +AscToTab

to locate any new home page.


8.2 E-mail

E-mail any feedback to jaf@yrl.co.uk. Sadly, we cannot guarantee any replies.


8.3 Support

A limited amount of support is available by emailing jaf@yrl.co.uk. Sadly, we cannot guarantee any replies, though we do try to be helpful.

Over time a user's FAQ may appear.


9 Known problems

None. (Ignorance is bliss)


10 Change History

10.1 Version 1.00 (December '97)

Initial release of command line version as postcardware.

© 1997 John A. Fotheringham