From f458e97fda5f3aff7249ad19636ad7a6e63460a8 Mon Sep 17 00:00:00 2001 From: Dietmar Maurer Date: Sat, 13 Feb 2021 08:54:23 +0100 Subject: [PATCH] docs: split out output-format.rst --- docs/backup-client.rst | 27 +-------------------------- docs/output-format.rst | 24 ++++++++++++++++++++++++ docs/proxmox-backup-client/man1.rst | 6 ++++++ 3 files changed, 31 insertions(+), 26 deletions(-) create mode 100644 docs/output-format.rst diff --git a/docs/backup-client.rst b/docs/backup-client.rst index 415e5bf01..933e24469 100644 --- a/docs/backup-client.rst +++ b/docs/backup-client.rst @@ -60,30 +60,7 @@ Environment Variables Output Format ------------- -Most commands support the ``--output-format`` parameter. It accepts -the following values: - -:``text``: Text format (default). Structured data is rendered as a table. - -:``json``: JSON (single line). - -:``json-pretty``: JSON (multiple lines, nicely formatted). - - -Please use the following environment variables to modify output behavior: - -``PROXMOX_OUTPUT_FORMAT`` - Defines the default output format. - -``PROXMOX_OUTPUT_NO_BORDER`` - If set (to any value), do not render table borders. - -``PROXMOX_OUTPUT_NO_HEADER`` - If set (to any value), do not render table headers. - -.. note:: The ``text`` format is designed to be human readable, and - not meant to be parsed by automation tools. Please use the ``json`` - format if you need to process the output. +.. include:: output-format.rst .. _client_creating_backups: @@ -748,5 +725,3 @@ benchmark using the ``benchmark`` subcommand of ``proxmox-backup-client``: You can also pass the ``--output-format`` parameter to output stats in ``json``, rather than the default table format. - - diff --git a/docs/output-format.rst b/docs/output-format.rst new file mode 100644 index 000000000..79f8a10f4 --- /dev/null +++ b/docs/output-format.rst @@ -0,0 +1,24 @@ +Most commands producing output supports the ``--output-format`` +parameter. It accepts the following values: + +:``text``: Text format (default). Structured data is rendered as a table. + +:``json``: JSON (single line). + +:``json-pretty``: JSON (multiple lines, nicely formatted). + + +Also, the following environment variables can modify output behavior: + +``PROXMOX_OUTPUT_FORMAT`` + Defines the default output format. + +``PROXMOX_OUTPUT_NO_BORDER`` + If set (to any value), do not render table borders. + +``PROXMOX_OUTPUT_NO_HEADER`` + If set (to any value), do not render table headers. + +.. note:: The ``text`` format is designed to be human readable, and + not meant to be parsed by automation tools. Please use the ``json`` + format if you need to process the output. diff --git a/docs/proxmox-backup-client/man1.rst b/docs/proxmox-backup-client/man1.rst index 5e7a95dcb..5ff235bc7 100644 --- a/docs/proxmox-backup-client/man1.rst +++ b/docs/proxmox-backup-client/man1.rst @@ -31,6 +31,12 @@ Those command are available when you start an intercative restore shell: .. include:: catalog-shell-synopsis.rst +Common Options +============== + +.. include:: ../output-format.rst + + Description ============