Changed Revolut expected CSV import format

This commit is contained in:
Gerwin van der Lugt 2020-05-18 11:29:03 +02:00
parent d168f42ba3
commit 138da17f65
2 changed files with 10 additions and 7 deletions

View File

@ -29,9 +29,12 @@ def main():
reader = RevolutCsvReader(args.input_file)
with Mt940Writer(args.output_file, args.account_iban) as writer:
for transaction in reader.get_all_transactions():
transactions = reader.get_all_transactions()
for transaction in transactions:
writer.write_transaction(transaction)
print('Wrote {} transactions to file: {}.'.format(len(transaction), args.output_file))
if __name__ == "__main__":
main()

View File

@ -8,12 +8,12 @@ from datetime import datetime, timedelta
from data import Transaction
EXCPECT_HEADERS = [
'Date started', 'Time started', 'Date completed', 'Time completed',
'State', 'Type', 'Description', 'Reference', 'Payer', 'Card name',
'Card number', 'Orig currency', 'Orig amount', 'Payment currency',
'Amount', 'Fee', 'Balance', 'Account', 'Beneficiary account number',
'Beneficiary sort code or routing number', 'Beneficiary IBAN',
'Beneficiary BIC'
'Date started (UTC)', 'Time started (UTC)', 'Date completed (UTC)',
'Time completed (UTC)', 'State', 'Type', 'Description', 'Reference',
'Payer', 'Card name', 'Card number', 'Orig currency', 'Orig amount',
'Payment currency', 'Amount', 'Fee', 'Balance', 'Account',
'Beneficiary account number', 'Beneficiary sort code or routing number',
'Beneficiary IBAN', 'Beneficiary BIC'
]
NAME_REMOVE_PREFIXES = [