From 0b3175fe6b1233d8797f952ecea242596282139e Mon Sep 17 00:00:00 2001 From: Brett Smith Date: Sat, 6 Mar 2021 15:43:04 -0500 Subject: [PATCH] query: Add support for --numberify. bean-query compatibility. --- conservancy_beancount/reports/query.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/conservancy_beancount/reports/query.py b/conservancy_beancount/reports/query.py index 0f9d53b..dce4779 100644 --- a/conservancy_beancount/reports/query.py +++ b/conservancy_beancount/reports/query.py @@ -256,6 +256,11 @@ fiscal year of the begin date. help="""Format of report to generate. Choices are {format_arg.choices_str()}. Default is guessed from your output filename extension, or 'text' if that fails. +""") + parser.add_argument( + '--numberify', '-m', + action='store_true', + help="""Separate currency amounts into numeric columns by currency """) parser.add_argument( '--output-file', '-O', '-o', @@ -339,7 +344,13 @@ def main(arglist: Optional[Sequence[str]]=None, args.stop_date, [rewrite.RewriteRuleset.from_yaml(path) for path in args.rewrite_rules], ) - shell = BQLShell(is_interactive, load_func, stdout, args.report_type.value) + shell = BQLShell( + is_interactive, + load_func, + stdout, + args.report_type.value, + args.numberify, + ) shell.on_Reload() if query is None: shell.cmdloop()