ovsdb-client: Break table formatting into new library.
[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 (default)"
7 Text-based tables with aligned columns.
8 .IP "\fBhtml\fR"
9 HTML tables.
10 .IP "\fBcvs\fR"
11 Comma-separated values as defined in RFC 4180.
12 .IP "\fBjson\fR"
13 JSON format as defined in RFC 4627.  The output is a sequence of JSON
14 objects, each of which corresponds to one table.  Each JSON object has
15 the following members with the noted values:
16 .RS
17 .IP "\fBcaption\fR"
18 The table's caption.  This member is omitted if the table has no
19 caption.
20 .IP "\fBheadings\fR"
21 An array with one element per table column.  Each array element is a
22 string giving the corresponding column's heading.
23 .IP "\fBdata\fR"
24 An array with one element per table row.  Each element is also an
25 array with one element per table column.  The elements of this
26 second-level array are the cells that constitute the table.  Cells
27 that represent OVSDB data or data types are expressed in the format
28 described in the OVSDB specification; other cells are simply expressed
29 as text strings.
30 .RE
31 .RE
32 .
33 .IP "\fB\-d \fIformat\fR"
34 .IP "\fB\-\-data=\fIformat\fR"
35 Sets the formatting for cells within output tables.  The following
36 types of \fIformat\fR are available:
37 .RS
38 .IP "\fBstring\fR (default)"
39 The simple format described in \fBovs\-vsctl\fR(8).
40 .IP "\fBjson\fR"
41 JSON.
42 .RE
43 .IP
44 The \fBjson\fR output format always outputs cells in JSON format,
45 ignoring this option.
46 .
47 .IP "\fB\-\-no\-heading\fR"
48 This option suppresses the heading row that otherwise appears in the
49 first row of table output.
50 .
51 .IP "\fB\-\-pretty\fR"
52 By default, JSON in output is printed as compactly as possible.  This
53 option causes JSON in output to be printed in a more readable
54 fashion.  Members of objects and elements of arrays are printed one
55 per line, with indentation.
56 .IP
57 This option does not affect JSON in tables, which is always printed
58 compactly.