query: Add support for --numberify.

bean-query compatibility.
This commit is contained in:
Brett Smith 2021-03-06 15:43:04 -05:00
parent a5ebc04f5d
commit 0b3175fe6b

View file

@ -256,6 +256,11 @@ fiscal year of the begin date.
help="""Format of report to generate. Choices are help="""Format of report to generate. Choices are
{format_arg.choices_str()}. Default is guessed from your output filename {format_arg.choices_str()}. Default is guessed from your output filename
extension, or 'text' if that fails. 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( parser.add_argument(
'--output-file', '-O', '-o', '--output-file', '-O', '-o',
@ -339,7 +344,13 @@ def main(arglist: Optional[Sequence[str]]=None,
args.stop_date, args.stop_date,
[rewrite.RewriteRuleset.from_yaml(path) for path in args.rewrite_rules], [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() shell.on_Reload()
if query is None: if query is None:
shell.cmdloop() shell.cmdloop()