Add option to disable push to YNAB

This commit is contained in:
Gabriel Augendre 2022-09-04 21:24:33 +02:00
parent 7ed84a47fe
commit 56564069c3
2 changed files with 10 additions and 2 deletions

View File

@ -80,7 +80,7 @@ class LclProcessor(OfxBaseProcessor):
return ofx
def main(filename, keep, download, send_method):
def main(filename, keep, download, send_method, push_to_ynab):
"""Import LCL bank statement (OFX file)."""
if download:
if filename:
@ -93,4 +93,5 @@ def main(filename, keep, download, send_method):
processor = LclProcessor(filename)
if send_method:
processor.send_reconciled_amount(send_method)
processor.push_to_ynab(keep)
if push_to_ynab:
processor.push_to_ynab(keep)

View File

@ -38,6 +38,13 @@ ARG_TO_OPTION = {
default="",
show_default=True,
),
"push_to_ynab": click.option(
"push_to_ynab",
"--push/--no-push",
help="Push the data to YNAB.",
default=True,
show_default=True,
),
}