stefreschke / dkb2homebank

Convert DKB account CSV files to a Homebank compatible CSV format

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

dkb2homebank

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.

How to run the script

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

Importing into Homebank

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.

Requirements

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.

Run the tests

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

About

Convert DKB account CSV files to a Homebank compatible CSV format

License:MIT License


Languages

Language:Python 100.0%