forked from gaugendre/ofx-processor
Fix push to ynab with revolut
This commit is contained in:
parent
01e0d481b6
commit
9dee12d2c5
1 changed files with 4 additions and 2 deletions
|
@ -5,6 +5,8 @@ from collections import defaultdict
|
||||||
import click
|
import click
|
||||||
import dateparser
|
import dateparser
|
||||||
|
|
||||||
|
from ofx_processor.utils import ynab
|
||||||
|
|
||||||
|
|
||||||
def process_amount(amount):
|
def process_amount(amount):
|
||||||
if amount:
|
if amount:
|
||||||
|
@ -40,7 +42,7 @@ def process_outflow(line):
|
||||||
default=False,
|
default=False,
|
||||||
help="Push data directly to YNAB instead of just writing a file.",
|
help="Push data directly to YNAB instead of just writing a file.",
|
||||||
)
|
)
|
||||||
def cli(csv_filename, ynab):
|
def cli(csv_filename, push_to_ynab):
|
||||||
formatted_data = []
|
formatted_data = []
|
||||||
ynab_transactions = []
|
ynab_transactions = []
|
||||||
transaction_ids = defaultdict(int)
|
transaction_ids = defaultdict(int)
|
||||||
|
@ -91,7 +93,7 @@ def cli(csv_filename, ynab):
|
||||||
else:
|
else:
|
||||||
click.secho("Nothing to write.")
|
click.secho("Nothing to write.")
|
||||||
|
|
||||||
if ynab and ynab_transactions:
|
if push_to_ynab and ynab_transactions:
|
||||||
ynab.push_transactions(ynab_transactions, "revolut")
|
ynab.push_transactions(ynab_transactions, "revolut")
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue