This script converts CSV account reports from Deutsche Kreditbank (DKB) to a CSV format that can be imported by the personal finance software Homebank.
You can find further instructions on my blog.
The script can either convert a DKB Cash account report or a Visa account report CSV file.
To convert a DKB Cash CSV file simply run:
./dkb2homebank.py --cash yourCashReportFile.csv
To convert a Visa CSV file run:
./dkb2homebank.py --visa yourVisaReportFile.csv
You can also choose an alternative path for your output file, if the standard "cashHomebank.csv" or "visaHomebank.csv" in the working directory doesn't do it for you. Use --output-file
or -o
for that:
./dkb2homebank.py --cash yourCashReportFile.csv --output-file ~/Documents/Finances/import_to_homebank.csv
Import the converted CSV file into Homebank by going to File -> Import
and selecting the output file you got when running your script.
Note: If Homebank tells you that your CSV file is invalid, go to Settings -> Import/Export
and make sure that the Delimiter
is set to semicolon
and try importing again.
To run this script, you need Python 3.4 or higher. I've verified that the exported CSV can be imported successfully on Homebank 5.0.0 and above.
I have included a (admittedly very small) set of tests to help a little bit during development. These tests use Python's unittest module and can be executed using:
./dkb2homebankTest.py
You can also test the script manually by using the provided testfiles:
./dkb2homebank.py --cash testfiles/cash.csv
or
./dkb2homebank.py --visa testfiles/visa.csv