]> piware.de Git - bin.git/commit
consors-report.py: Convert to comma separated input
authorMartin Pitt <martin@piware.de>
Sun, 10 Dec 2023 14:40:15 +0000 (15:40 +0100)
committerMartin Pitt <martin@piware.de>
Sun, 10 Dec 2023 14:49:14 +0000 (15:49 +0100)
commit6da88a57b007c9abf88e82df8cf513bfba397593
treee25d618ce695c848d9fc78706c7df6398db45ccb
parentc2223f6ec6bfeb9a1acc749e8207994a96902d4a
consors-report.py: Convert to comma separated input

Consorsbank changed its format from semicolon separator without quotes
to comma separator with quotes. Move to the `csv` stdlib module for that.

Convert old to new format 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)
```
consors-report.py