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 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).""" """Import LCL bank statement (OFX file)."""
if download: if download:
if filename: if filename:
@ -93,4 +93,5 @@ def main(filename, keep, download, send_method):
processor = LclProcessor(filename) processor = LclProcessor(filename)
if send_method: if send_method:
processor.send_reconciled_amount(send_method) processor.send_reconciled_amount(send_method)
if push_to_ynab:
processor.push_to_ynab(keep) processor.push_to_ynab(keep)

View file

@ -38,6 +38,13 @@ ARG_TO_OPTION = {
default="", default="",
show_default=True, 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,
),
} }