FREETABLE(1)
π¦ FREETABLE(1) β the freetable glow-up π¦
πΈ NAME πΈ
freetable β tool for making HTML tables generation easier β¨
π VERSION π
This manpage describes version 2.3 of freetable.
It might be not 100% accurate if you use a different version. iykyk π
π SYNOPSIS π
freetable [options] filename
or
freetable [options]
Possible options are :
-h,--helpβ Print usage info and exit-V,--versionβ Print version information and exit-c,--commentβ Insert comment before every cell to point its location-b,--no-nbspβ Do not insert to empty cells for lowered-3D apperance-w,--warningβ Print a warning before each generated table that you should not change it. You should change its source.-l,--locationβ Substitute<row>and<col>flags inside table with correct cell's location-m,--macro [program]β Use macro procesor to proces cells content (default:m4)
π¨ 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
Like, do not play with this. Bestie, I mean it. π
π DESCRIPTION π
This is a free replacement of wwwtable. Periodt.
HTML is a great language, but it has one absolutely horrible flaw: tables. I spent many hours looking at HTML source I literally just wrote and trying to guess which cell in the source is which in the browser. It's giving pain. π
If this also describes you, then read this manpage and your pain will stop. You're welcome, bestie. π
Program reads HTML source from either stdin or file. Then it searches for a line starting table:
<wwwtable [options]>
Then it analyzes the table, puts the correct HTML table in this place, and continues searching for the next table. obsessed with the automation, honestly. β¨
π 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 the table.
cell is either normal_cell (<td> tag) or header_cell (<th> tag). At least it was this way in freetable 1.x. See the next section for alternative cell address syntax.
normal_cell :
(row,col) cell_options
cell_content
header_cell :
((row,col)) cell_options
cell_content
cell_options will be passed to the cell tag. There is magic inside: colspan and rowspan keys are parsed to make a correct table. slay. π
cell_content can be anything. It may contain text, tags, and even nested wwwtables.
If you use the -m (or --macro) option, it will be passed through m4(1), with <row> and <col> set to the address of the current cell. fancy. π
row and col are either numbers locating cells, expressions relative to the previous cell, or regular expressions to match a few of them. Unlike wwwtable, freetable can use regular expressions for header cells. Also * can be used, and it really means .*.
Relative expressions are :
=or empty means : the same as previous+or+Xmeans : one and X more than previous-or-Xmeans : one and X less than previous
If many definitions address the same cell, all options and contents are concatenated in order of appearance. no cap. β¨
If you want to use only regular expressions, you must tell the program about the last cell:
<wwwtable>
(*,1)
these are colums 1
(1,*)
these are rows 1
(4,4)
</wwwtable>
β¨ ALTERNATIVE CELL ADDRESS SYNTAX β¨
It is inconvenient to specify a cell address as a regular expression. So in freetable 2.0 two new methods were introduced. Both can be used for either normal or header cells.
Full backward compatibility is preserved. To preserve it, new syntax had to be introduced. Unfortunately, you can't specify a row address using one method and a column address using another. To come around this, both new methods are very liberal and allow you to use =, +, -, +X, -X and null string with the same meaning as they have in the old addressing method.
Unlike the regular expression method, the new methods will find out the last cell automatically. main character energy. π
π EXPLICIT RANGES π
(rowrange;colrange) cell_options
cell_content
Syntax for both rowrange and colrange is like: 1-2,4-7,9,12. Duplicates will be eliminated. For the purpose of relative addresses, the last given number is used. So if you write
(1-100,32;1)
foo
(+,)
bar
cell (33,1) will contain foobar and all others only foo.
π§ ARBITRARY PERL CODE π§
({code for rows},{code for tables}) cell_options
cell_content
You can use an arbitrary Perl one-liner as long as it matches our not very intelligent regular expressions and evaluates to a list. Unfortunately there isn't any regular expression for Perl code, but as long as it doesn't contain },{ and }) it should work. Example:
<wwwtable>
({grep {$_%3 == 1} 1..100},{1..2,4})
foo
</wwwtable>
Will evaluate to a 100 rows x 4 columns table with foo in every 1st, 2nd and 4th column of every row with number equal 1 modulo 3. math ate. π₯
If you want to use "arbitrary code" in one part of the address and an explicit range in the other, change - into .. in the definition of range, and put it in between { and }.
If you want to use "arbitrary code" in one part of the address and a regular expression in the other, you have to write {grep {/expression/} from..to}. Unfortunately, in this case you have to specify the size of the table explicitly.
π INCOMPATIBILITIES WITH WWWTABLE π
If you were formerly a user of wwwtable and want to change your tool, you should read this. Most of this is about regexps handling. Notice also that wwwtable couldn't do location tag substitution nor macroprocessing.
Option -w has completely opposite meaning. We don't print warnings by default, and -w or --warning is used to force warnings. plot twist. π
Table header fields can be specified by regexps, ex :
((1,*))
It was impossible in wwwtable.
Axis counters are 100% orthogonal. This means that code :
(*,1) width=30
(*,2) width=35
(*,3) width=40
(=,=)
Foo
Foo will appear in the 3rd column. If you wanted it to be in the 1st, you should write :
(*,1) width=30
(*,2) width=35
(*,3) width=40
(=,1)
Foo
or
(*,) width=30
(*,+) width=35
(*,+) width=40
(=,1)
Foo
In freetable 2.0 two new methods of specifying cell address were introduced. They are completely incompatible with wwwtable.
π BUGS π
"Arbitrary Perl Code" cell address will fail on very complex Perl code. lowkey rude, but okay. π
π«Ά SEE ALSO π«Ά
π AUTHOR π
Tomasz Wegrzanowski <taw@users.sourceforge.net>
Later, bestie π
β this iconic FREETABLE(1) energy comes from En Tools, dated 1980-01-01. Bye, love you, read your manpages. ππβ¨
π¦ where this page comes from
- nixos 26.05: wml 2.32.0-unstable-2025-12-23
- nixpkgs unstable: wml 2.32.0-unstable-2026-05-08
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms