table2html(1f) - [FILE FILTER] filter to format simple columns into an HTML table form (LICENSE:PD)
Synopsis
Description
Options
Examples
Author
License
table2html [[ -classes classnames] [ -caption caption line] [ -delimiters delim] [ -asis] [ -header] [ -tabletags tags] ] |-help|-version
table2html is a filter that converts tabular text input to an HTML table. The program can create an HTML table displaying alternating hues per row.The "-classes" option generates code using cascading style sheet (CSS) class names for alternating rows; default names are "even" and "odd". The following style definition in a pages <head> section will assign different background hues to be used:
<style type="text/css"> .even { background-color: #FFFFFF; } .odd { background-color: #F0F0F0; } </style>
-caption a caption line for the table -classes use CSS class names for different rows (empty argument: odd even) -delimiters input column delimiter (default: whitespace). If a list contains space the space must not be last in the list. -header the first row is assumed to be a header line (default: no header lines) -tabletags specify own HTML table tags instead of the default: border="1" -document write complete HTML document instead of just table -asis by default the characters ><& are converted to their HTML equivalents. This option turns that conversion off. -help display command help and exit -version display command metadata and exit
Sample usage:
# list month as a table cal|tail -n +2|table2html -caption $(cal|head -n 1) -document |w3m -dump -T text/html|more
John S. Urban
Public Domain
Nemo Release 3.1 | table2html (1) | February 23, 2025 |