diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2022-10-18 17:45:04 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2022-10-18 17:45:04 +0000 |
commit | bf6656b601d10f139d5b146eb65feca9f4f3fe91 (patch) | |
tree | fff61580a08934083aab3043d228c2f484f6f844 /cli_helpers/tabular_output | |
parent | Adding upstream version 2.2.1. (diff) | |
download | cli-helpers-bf6656b601d10f139d5b146eb65feca9f4f3fe91.tar.xz cli-helpers-bf6656b601d10f139d5b146eb65feca9f4f3fe91.zip |
Adding upstream version 2.3.0.upstream/2.3.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'cli_helpers/tabular_output')
-rw-r--r-- | cli_helpers/tabular_output/tabulate_adapter.py | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/cli_helpers/tabular_output/tabulate_adapter.py b/cli_helpers/tabular_output/tabulate_adapter.py index a7eabc0..2c557f8 100644 --- a/cli_helpers/tabular_output/tabulate_adapter.py +++ b/cli_helpers/tabular_output/tabulate_adapter.py @@ -52,9 +52,25 @@ tabulate._table_formats["ascii"] = tabulate.TableFormat( with_header_hide=None, ) +tabulate._table_formats["ascii_escaped"] = tabulate.TableFormat( + lineabove=tabulate.Line("+", "-", "+", "+"), + linebelowheader=tabulate.Line("+", "-", "+", "+"), + linebetweenrows=None, + linebelow=tabulate.Line("+", "-", "+", "+"), + headerrow=tabulate.DataRow("|", "|", "|"), + datarow=tabulate.DataRow("|", "|", "|"), + padding=1, + with_header_hide=None, +) + # "minimal" is the same as "plain", but without headers tabulate._table_formats["minimal"] = tabulate._table_formats["plain"] +tabulate.multiline_formats["psql_unicode"] = "psql_unicode" +tabulate.multiline_formats["double"] = "double" +tabulate.multiline_formats["ascii"] = "ascii" +tabulate.multiline_formats["minimal"] = "minimal" + supported_markup_formats = ( "mediawiki", "html", @@ -66,6 +82,7 @@ supported_markup_formats = ( ) supported_table_formats = ( "ascii", + "ascii_escaped", "plain", "simple", "minimal", @@ -82,7 +99,10 @@ supported_table_formats = ( supported_formats = supported_markup_formats + supported_table_formats -default_kwargs = {"ascii": {"numalign": "left"}} +default_kwargs = { + "ascii": {"numalign": "left"}, + "ascii_escaped": {"numalign": "left"}, +} headless_formats = ("minimal",) |