Documentation: Auxiliaries / freetable

Introduction Frontends Backends Includes Auxilliaries
freetable - tool for making HTML tables generation easier


NAME

freetable - tool for making HTML tables generation easier


VERSION

This manpage describes version 0.11 of freetable.

It may be not 100% accurate if you use different version.


SYNOPSIS

freetable [options] filename

Possible options are :

-h or --help Print usage info and exit

-V or --version Print version information and exit

-c or --comment Do comment before every cell to point its location

-b or --no-nbsp Do not insert   to empty cells to make lowered 3D apperance

-w or --warning Print a warning before each generated table that you should not change it. You should change its source.

-l or --location Substitute <row> and <col> flags inside table with correct cell's location

-m or --macro [program] Use macro procesor to proces cells content (default: m4)


SECURITY WARNING

 DO NOT USE MACRO PROCESSOR OVER UNSURE SOURCE
 M4 MAY BE USED TO COMPROMISE YOUR SECURITY
 FOR MORE INFORMATION ON THIS EXEC :
 (info m4 'UNIX commands' syscmd)


DESCRIPTION

This is free replacement of wwwtable

HTML is great language, but have one horrible flaw : tables. I spent many hours looking at HTML source I just written and trying to guess which cell in source is which in browser.

If this also describes you, then read this manpage and your pain will stop.

Program read HTML source from either stdin or file. Then it searches for line starting table:

    <wwwtable [options]>

Then it analyzes table, put correct HTML table in this place and continue searching for the next table.


TABLE SYNTAX

It is very easy:

    wwwtable :
    <wwwtable [wwwtable_options]>
    [preamble]
    [cell]
    [cell]
    ...
    </wwwtable>

wwwtable_options will be passed to <TABLE> tags. There is no magic inside preamble. It can be any HTML text. It will be simply put in front of table.

cell is either normal_cell (<TD> tag) or header_cell (<TH> tag)

    normal_cell :
    (row,col) cell_options
    cell_content
    header_cell :
    ((row,col)) cell_options
    cell_content

cell_options will be passed to cell tag. There is magic inside colspan and rowspan keys are parsed to make correct table.

cell_content can be anything. It may contain text, tags, and even nested wwwtables.

If you use -m (or --macro) option, it will be passed thru m4(1), with <row> and <col> set to adress of curent cell

row and col are either numbers locating cells, expressions relative to previous cell or regular expresions to match few of them. Unlike wwwtable, freetable can use regular expresions for header cells. Also * can be used, and it mean .* really.

Relative expressions are :

= or empty what mean : the same as previous

+ or +X what mean : one and X more than previous

- or -X what mean : one and X less than previous

If many definisions adress the same cell all options and contents are concatenated in order of apperance.

If you want use only regular expresions you must tell program about the last cell :

    <wwwtable>
    (*,1)
    these are colums 1
    (1,*)
    these are rows 1
    (4,4)
    </wwwtable>


INCOMPATIBILITIES WITH WWWTABLE

If you was formerly user of wwwtable and want to change your tool, you should read this. Most of this is about regexps handling. Notice also that wwwtable couldnt do location tags substitution nor macroprocesing.

Option -w has completely oposite meaning. We dont print warnings by default, and -w or --warning is used to force warnings.

Table header fields can be specified by regexps ex :

    ((1,*))

It was impossible in wwwtable.

Axis counters are 100% orthogonal. This mean that code :

    (*,1) width=30
    (*,2) width=35
    (*,3) width=40
    (=,=)
    Foo

Foo will appear in 3rd column, and if you wanted it to be in 1th this should be written :

    (*,1) width=30
    (*,2) width=35
    (*,3) width=40
    (=,1)
    Foo

or

    (*,) width=30
    (*,+) width=35
    (*,+) width=40
    (=,1)
    Foo


SEE ALSO

    B<m4(1)>


AUTHOR

Tomasz Węgrzanowski <maniek@beer.com>