summaryrefslogtreecommitdiffstats
path: root/cli_helpers
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2022-10-18 17:45:07 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2022-10-18 17:45:30 +0000
commitbde3b5a9868760190f1cbda3eb4e133d3db9409d (patch)
treeca63644e4f19c084cc0968122f4917d06fe7ff9f /cli_helpers
parentReleasing debian version 2.2.1-1. (diff)
downloadcli-helpers-bde3b5a9868760190f1cbda3eb4e133d3db9409d.tar.xz
cli-helpers-bde3b5a9868760190f1cbda3eb4e133d3db9409d.zip
Merging upstream version 2.3.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'cli_helpers')
-rw-r--r--cli_helpers/__init__.py2
-rw-r--r--cli_helpers/tabular_output/tabulate_adapter.py22
2 files changed, 22 insertions, 2 deletions
diff --git a/cli_helpers/__init__.py b/cli_helpers/__init__.py
index b19ee4b..55e4709 100644
--- a/cli_helpers/__init__.py
+++ b/cli_helpers/__init__.py
@@ -1 +1 @@
-__version__ = "2.2.1"
+__version__ = "2.3.0"
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",)