1LIBXO(3)                 BSD Library Functions Manual                 LIBXO(3)
2

NAME

4     xo_options — common options for libxo-based commands
5

DESCRIPTION

7     libxo allows the rendering of data into various output styles, including
8     text, XML, JSON, and HTML.  libxo uses command line options to trigger
9     rendering behavior.  Options are recognised in three forms:
10
11     --libxo <options>
12
13     --libxo=<options>
14
15     --libxo:<brief-options>
16
17     The first two forms accept a comma-separated set of words, detailed be‐
18     low, while the third form accepts a set of letters, also below.  The
19     triggered functionality is identical.
20
21     Option      Action
22     color       Enable colors/effects for display styles (TEXT, HTML)
23     flush       Flush after each emit call
24     flush-line  Flush each line of output
25     html        Emit HTML output
26     indent=xx   Set the indentation level
27     info        Add info attributes (HTML)
28     json        Emit JSON output
29     keys        Emit the key attribute for keys (XML)
30     log-gettext Log (via stderr) each gettext(3) string lookup
31     log-syslog  Log (via stderr) each syslog message (via xo_syslog)
32     no-humanize Ignore the {h:} modifier (TEXT, HTML)
33     no-locale   Do not initialize the locale setting
34     no-retain   Prevent retaining formatting information
35     pretty      Emit pretty-printed output
36     retain      Force retaining formatting information
37     text        Emit TEXT output
38     underscores Replace XML-friendly
39     units       Add the 'units' (XML) or 'data-units (HTML) attribute
40     warn        Emit warnings when libxo detects bad calls
41     warn-xml    Emit warnings in XML
42     xml         Emit XML output
43     xpath       Add XPath expressions (HTML)
44
45     The brief options are a set of single-letter aliases for the longer
46     terms, used as a single string:
47
48     Value Equivalent Token
49     c
50     f      flush
51     F      flush-line
52     H      html
53     I      info
54     i<num> indent=<num>
55     J      json
56     k      keys
57     n      no-humanize
58     P      pretty
59     T      text
60     U      units
61     u      underscore
62     W      warn
63     X      xml
64     x      xpath
65
66     Most of these option are simple and direct, but some require additional
67     details:
68
69     flush-line performs line buffering, even when the output is not directed
70     to a TTY device.
71
72     info generates additional data for HTML, encoded in attributes using
73     names that state with "data-".
74
75     keys adds a "key" attribute for XML output to indicate that a leaf is an
76     identifier for the list member.
77
78     no-humanize avoids "humanizing" numeric output (see humanize_number(3)
79     for details).
80
81     no-locale instructs libxo to avoid translating output to the current lo‐
82     cale.
83
84     no-retain disables the ability of libxo to internally retain "compiled"
85     information about formatting strings.
86
87     underscores can be used with JSON output to change XML -friendly names
88     with dashes into JSON -friendly name with underscores.
89
90     warn allows libxo to emit warnings on stderr when application code make
91     incorrect calls.  warn-xml causes those warnings to be placed in XML in‐
92     side the output.
93

EXAMPLES

95     The following are three example invocations of ps(1):
96
97           ps --libxo json,pretty,warn -ux
98
99           ps --libxo=xml -lg
100
101           ps --libxo:Hxc 1
102

SEE ALSO

104     libxo(3), xo_format(5)
105

HISTORY

107     The libxo library first appeared in FreeBSD 11.0.
108

AUTHORS

110     libxo was written by Phil Shafer <phil@freebsd.org>.
111

ADDITIONAL DOCUMENTATION

113     FreeBSD uses libxo version 1.6.0.  Complete documentation can be found on
114     github:
115
116           https://juniper.github.io/libxo/1.6.0/html/index.html
117
118     libxo lives on github as:
119
120           https://github.com/Juniper/libxo
121
122     The latest release of libxo is available at:
123
124           https://github.com/Juniper/libxo/releases
125

HISTORY

127     The libxo library was added in FreeBSD 11.0.
128

AUTHOR

130     Phil Shafer
131
132BSD                              May 11, 2017                              BSD
Impressum