Consors changed back to semicolon separator (see commit
6da88a57b007c9),
and added a 9th field "Währung".
Convert the older CSVs with
```py
import csv
import sys
with open(sys.argv[1], 'r') as csvfile:
reader = csv.reader(csvfile, delimiter=',', quotechar='"')
writer = csv.writer(sys.stdout, delimiter=';', quotechar='"')
for row in reader:
writer.writerow(row)
```
def parse_entry(raw_fields: Iterable[str]) -> Entry:
fields = [f.strip() for f in raw_fields]
def parse_entry(raw_fields: Iterable[str]) -> Entry:
fields = [f.strip() for f in raw_fields]
+ # format change in May 2024, adds a 9th field "Währung"; ignore
+ fields = fields[:8]
# last field is the value, parse as float
value = float(fields.pop().replace('.', '').replace(',', '.'))
# match on who, IBAN, type, or desc
# last field is the value, parse as float
value = float(fields.pop().replace('.', '').replace(',', '.'))
# match on who, IBAN, type, or desc
return filter_re.search(entry.date)
with path.open() as f:
return filter_re.search(entry.date)
with path.open() as f:
+ reader = csv.reader(f, delimiter=';')
next(reader) # skip header
# first line is the column headers, chop it off
entries = map(parse_entry, reader)
next(reader) # skip header
# first line is the column headers, chop it off
entries = map(parse_entry, reader)