table: Add new "bare" output formatting options.
[sliver-openvswitch.git] / lib / table.man
1 .IP "\fB\-f \fIformat\fR"
2 .IQ "\fB\-\-format=\fIformat\fR"
3 Sets the type of table formatting.  The following types of
4 \fIformat\fR are available:
5 .RS
6 .IP "\fBtable\fR"
7 2-D text tables with aligned columns.
8 .IP "\fBlist\fR"
9 A list with one column per line and rows separated by a blank line.
10 .IP "\fBhtml\fR"
11 HTML tables.
12 .IP "\fBcvs\fR"
13 Comma-separated values as defined in RFC 4180.
14 .IP "\fBjson\fR"
15 JSON format as defined in RFC 4627.  The output is a sequence of JSON
16 objects, each of which corresponds to one table.  Each JSON object has
17 the following members with the noted values:
18 .RS
19 .IP "\fBcaption\fR"
20 The table's caption.  This member is omitted if the table has no
21 caption.
22 .IP "\fBheadings\fR"
23 An array with one element per table column.  Each array element is a
24 string giving the corresponding column's heading.
25 .IP "\fBdata\fR"
26 An array with one element per table row.  Each element is also an
27 array with one element per table column.  The elements of this
28 second-level array are the cells that constitute the table.  Cells
29 that represent OVSDB data or data types are expressed in the format
30 described in the OVSDB specification; other cells are simply expressed
31 as text strings.
32 .RE
33 .RE
34 .
35 .IP "\fB\-d \fIformat\fR"
36 .IP "\fB\-\-data=\fIformat\fR"
37 Sets the formatting for cells within output tables.  The following
38 types of \fIformat\fR are available:
39 .RS
40 .IP "\fBstring\fR (default)"
41 The simple format described in \fBovs\-vsctl\fR(8).
42 .IP "\fBbare\fR"
43 The simple format with punctuation stripped off: \fB[]\fR and \fB{}\fR
44 are omitted around sets, maps, and empty columns, items within sets
45 and maps are space-separated, and strings are never quoted.  This
46 format may be easier for scripts to parse.
47 .IP "\fBjson\fR"
48 JSON.
49 .RE
50 .IP
51 The \fBjson\fR output format always outputs cells in JSON format,
52 ignoring this option.
53 .
54 .IP "\fB\-\-no\-heading\fR"
55 This option suppresses the heading row that otherwise appears in the
56 first row of table output.
57 .
58 .IP "\fB\-\-pretty\fR"
59 By default, JSON in output is printed as compactly as possible.  This
60 option causes JSON in output to be printed in a more readable
61 fashion.  Members of objects and elements of arrays are printed one
62 per line, with indentation.
63 .IP
64 This option does not affect JSON in tables, which is always printed
65 compactly.
66 .IP "\fB\-\-bare\fR"
67 Equivalent to \fB\-\-format=list \-\-data=bare \-\-no\-headings\fR.