]> git.proxmox.com Git - pve-docs.git/commitdiff
output-format.adoc: documentation for output format options
authorDietmar Maurer <dietmar@proxmox.com>
Fri, 27 Jul 2018 07:54:44 +0000 (09:54 +0200)
committerDietmar Maurer <dietmar@proxmox.com>
Fri, 27 Jul 2018 08:23:13 +0000 (10:23 +0200)
gen-output-format-opts.pl [new file with mode: 0755]
output-format-opts.adoc [new file with mode: 0644]
output-format.adoc [new file with mode: 0644]

diff --git a/gen-output-format-opts.pl b/gen-output-format-opts.pl
new file mode 100755 (executable)
index 0000000..69e78a0
--- /dev/null
@@ -0,0 +1,13 @@
+#!/usr/bin/perl
+
+use lib '.';
+use strict;
+use warnings;
+use PVE::JSONSchema;
+use PVE::RESTHandler;
+
+my $prop = $PVE::RESTHandler::standard_output_options;
+
+my $data = PVE::RESTHandler::dump_properties($prop, 'asciidoc', 'config');
+
+print $data;
diff --git a/output-format-opts.adoc b/output-format-opts.adoc
new file mode 100644 (file)
index 0000000..fad02c3
--- /dev/null
@@ -0,0 +1,20 @@
+`human-readable`: `<boolean>` ('default =' `1`)::
+
+Call output rendering functions to produce human readable text.
+
+`noborder`: `<boolean>` ('default =' `1`)::
+
+Do not draw borders (for 'text' format).
+
+`noheader`: `<boolean>` ('default =' `1`)::
+
+Do not show column headers (for 'text' format).
+
+`output-format`: `<json | json-pretty | text | yaml>` ('default =' `text`)::
+
+Output format.
+
+`quiet`: `<boolean>` ::
+
+Suppress printing results.
+
diff --git a/output-format.adoc b/output-format.adoc
new file mode 100644 (file)
index 0000000..41c437b
--- /dev/null
@@ -0,0 +1,23 @@
+ifndef::manvolnum[]
+Output format otions `[FORMAT_OPTIONS]`
+---------------------------------------
+endif::manvolnum[]
+ifdef::manvolnum[]
+FORMAT_OPTIONS
+--------------
+endif::manvolnum[]
+
+It is possible to specify the output format using the
+`--outout-format` parameter. The default format 'text' uses ASCII-art
+to draw nice borders around tables. It additionally transforms some
+values into human-readable text, for example:
+
+- Unix epoch is displayed as ISO 8601 date string.
+- Durations are displayed as week/day/hour/miniute/secound count, i.e `1d 5h`.
+- Byte sizes value include units (`B`, `KiB`, `MiB`, `GiB`, `TiB`, `PiB`).
+- Fractions are display as percentage, i.e. 1.0 is displayed as 100%.
+
+You can also completely suppress output using option `--quiet`.
+
+
+include::output-format-opts.adoc[]