|<B>-break=B>str||Set the inter-column break string to "str. The default is a tab (\t"). If <B>-stripB> is also given, blanks surrounding the break string will also be ignored.|
|<B>-dB>str||This is the same as -break=str.|
|<B>-nod(ashes)B>||Do not ignore lines of separators, such as dashes, equal signs, or underlines. If <B>-nodashesB> is given, and these lines do occur in the stream, they will be treated as normal data.|
|<B>-ti(tles)[=B>NN<B>]B>||Treat the first NN rows of data as column titles; multiple words in the column titles may wrap vertically. If NN is omitted, it defaults to 1. No <B>-titlesB> option is the same as <B>-titles=0B>.|
|<B>-in(put)=B>type||Set the input type as type, which can be one of: box, list, table, or simple. A simple-type table is the same as a table-type, but no wrapping characters are recognized.|
|<B>-s(trip)B>||Strip blanks from around the column values.|
|<B>-nos(trip)B>||Do not strip blanks from the input. Useful if there is formatted or aligned data within a boxed table.|
|<B>-t(able)B>||Use a table format for output, with wrapping of column values longer than the given or determined column widths. See Data::ShowTable for more details.|
|<B>-si(mple)B>||Use a simple table format, without any wrapping of column values. See Data::ShowTable for more details.|
|<B>-l(ist)B>||Use a list style format. See Data::ShowTable for more details.|
|<B>-b(ox)B>||Use a boxed style table. See Data::ShowTable for more details.|
|<B>-ht(ml)B>||Use HTML-formating. See Data::ShowTable for more details.|
|<B>-ti(tles)=B>name1<B>,B>name2<B>,...,B>nameN||Define the column names explicitly. This is useful for naming columns of data from STDIN, when <B>showtableB> is being used as a filter. The first column name, name1, cannot begin with a digit. This option allows any column titles obtained from the input to be overridden.|
|<B>-noh(eaders)B>||Do not output any headers on the tables; <B>-titles=0B> implies this option.|
|<B>-fB>n1[,n2, ..., nN]||
Select fields numbered n1, n2, etc., to display. Each nN is a
field index, or a range of indexes in the form: N-M The default
is to show all the fields in each row. Fields are numbered from 1. An
example: to show the first, and three through five fields of the
|<B>-fieldsB>=fname1[,fname2, ..., fnameN]||
Select the named fields to display. The field names must be available, either
through the data stream, or by using the <B>-titlesB> option. The field
names given must match the existing field names exactly.
Using the file /etc/passwd for another example: to show the same first two fields, by name:
Set the maximum table width. This value is applied to the variable
Data::Showtable::Max_Table_Width. When the total width of all
columns to be displayed exceeds this value, all column widths are scaled
If <B>-widthB> is not given, then for all output but <B>-htmlB>, the default value is either "COLUMNS", if defined, or 80, if not. Whith <B>-htmlB> mode, there is no default value for <B>-widthB>; in other words, there is no limit to the width.
Set individual column widths to the specified values. Empty column
widths imply no maximum width. If the <B>-widthB> option is also given,
then the <B>-cwidthB> column widths can also be given as fractions or
Example: To set the maximum width of the third column to 20 characters:
|<B>-noe(scape)B>||Do not perform HTML escape sequences on the data; this allows embedded HTML text in the data to be displayed properly with the <B>-htmlB> option.|
|<B>-attributesB>=attr1 attr2 ...||
Declare the table attributes, which are inserted into the TABLE
token. For example, the option:
would cause the following HTML:
The default table attributes are:
Set the HTML formats for the column titles. The <B>-title_formatsB> (or
just <B>-tfB>) can be given multiple times, for each column, or formats
for multiple columns can be given on the same option separated by
Each fmtN can itself be multiple HTML items, separated by commas. Each HTML element can be given either as an HTML token (eg: "\<BOLD\>), or as a plain name (eg: BOLD").
For example, here is a title format specification for three columns, where the first column title should be bold italic, the second italic, and the third italic in a smaller font:
|<B>-d(ata)_f(formats)B>=fmt1;fmt2;...;fmtN||The same as <B>-title_formatsB> but applies to the column data.|
Define a mapping from column names, or indexes, to URLs to be inserted
as <A HREFs> around the values for the named columns. Each colN is
a column name or index, and each urlN is a string representing the
URL to be inserted for the given column.
The URL text may contain these substitution strings:
|<B>-helpB>||Display some help to the user and quit.|
Morever, data wrapped within a column is recognized and parsed as one column value, by recognizing the presence of a wrapping prefix or wrapping suffix character. Currently, the wrapping prefix character is <, and the wrapping suffix character is >.
An example of data wrapped within a column is given here. The table below has just two logical rows of data; with both rows having data wrapped into multiple physical rows.
| Col 1 | Col 2 | Col 3 |
| This is>| Another>| Row 1,3>|
|< a cont>|< value. |<is also>|
|<inued >| |<long. |
|<value. | | |
|This is >| Item2-2 | Item2-3 |
When using the <B>-listB> or <B>-input=listB> options, either, or both, the
input and output may be in a list format, which is implemented
using the following syntax:
Each row of data consists of one or more columns, and ends with a blank line.
Each column consists of a column name, followed by a colon :, followed by an optional, single space or tab, followed by the column value, on the same line.
Continuation lines of the previous column value consist of one or more
space or tab characters, a colon :, one optional, single space
or tab, followed by the continuation value. In the example above,
The second column value of the second row was continued.
HTML Input with HTML Output
When using <B>-htmlB> on data already containing HTML-formatted text,
the <B>-noescapeB> option should be used. By default, all input
text is assumed not to be HTML-formatted, and is escaped
allowing embedded <, > characters, if any, to be displayed
<B>Data::ShowTableB> module Performs the actual output formatting.
Alan K. Stebbens email@example.com
o Currently, the box formatting characters are not configurable: + for the corners; - and | for the tops and sides, respectively. In an ideal world, these things would be configurable. o The continuation prefix and suffix characters, < and >, respectively, are also not configurable: o When reading table input, any data ending with > will be considered to be continued by the next row of data. To avoid this, use <B>-input=simpleB>. o When selecting noncontiguous fields (ie: <B>-f1,4B>>) without field names, the default field names will be consecutively numbered from 1, which is counter-intuitive to the original selection. To avoid this, name the fields using the <B>-title=...B> option.
|perl v5.20.3||SHOWTABLE (1)||2013-10-25|