KtoBLZCheck is a library to check account numbers and bank codes of
German banks.

Naming explanation: This library provides a check for "kto" (German
abbreviation for account number) and "blz" (German abbreviation for
bank identification code, A.B.A. code or similar).

Introduction
------------

Both a library for other programs as well as a short command-line tool
is available. It is possible to check pairs of account numbers and
bank codes (BLZ) of German banks, and to map bank codes (BLZ) to the
clear-text name and location of the bank. Python bindings are provided
as well (--enable-python; requires the python module "ctypes").

For compile instructions concerning MS Windows, please see the file
README.WIN32. On the download page a self-installing setup file for
Windows compiled with MinGW/gcc3.2 can be found.


Compile & Install
-----------------

How to compile:

If you got this package from GIT, then type "./autogen.sh" to create
the necessary build tools. Then:

Type 

  ./configure

to calculate some system dependencies. See "./configure --help" for
possible options.

Now type 

  make
  make install

and you're done.


Running
-------

  ktoblzcheck <your-bank-id> <your-account-id>

Some example BLZ;Account-ids are the following from Bundesbank:
64192220;12345008
20210200;0240334000
56061472;0000191919

The ktoblzcheck command has several optional arguments; use "--help"
to see a summary. (The argument --outformat by default is
"multiline". The other choice, "--outformat=oneline", gives you one
line of result with the following tab-delimited fields: "bank name,
bank city, result of check, BLZ, accountId, name of the checking
algorithm". This format is more suitable if multiple account numbers
are read from an input file using the option --infile.)


Bank List Format
----------------

A file with all bank codes (BLZ Datei) can regularly be retrieved from
the Deutsche Bundesbank at bundesbank.de, more specifically from

http://www.bundesbank.de/zahlungsverkehr/zahlungsverkehr_bankleitzahlen_download.php

Updating to the most recent bank data file is done by running the
provided script online_update.pl.

Since version 1.16, ktoblzcheck installs multiple bankdata files which
are valid at different dates. Each of the bank code files from the
Deutsche Bundesbank is valid for three (3) months.  Ktoblzcheck ships
with the bankdata file from several validity periods: One file is
valid at the date of release; and the second file is valid in the three
subsequent months (i.e. it is newer). If even the newest file is
outdated at the day of when libktoblzcheck is used, a warning line
will be printed to stderr and the newest file will be used anyway.

Note: The available files (marked by the first valid day as part of
the filename) and their validity period are looked up by simply taking
all files in the BANKDATA_PATH folder into consideration. Hence, you
can install a new bank data file by copying the correct file format
into that folder, which is done automatically by the perl script
online_update.pl.

Note 2nd: The bank data file "bankdata.txt" with no date in the file
name is not used anymore. It used to be a one-to-one copy of the
newest file, but with ktoblzcheck-1.35 this file is neither used nor
shipped anymore.

Note 3rd: All of the above is ignored if a bankdata file is explicitly
requested by the command line argument --file=... . In that case
the specified file is used and no further date comparisons are made.

Since version 1.3, ktoblzcheck includes a script for automated
download of a new bankdata file in
/usr/share/ktoblzcheck/online_update.pl . Simply run this script with
no arguments. It will first download the information HTML page by
bundesbank and parse this page for BLZ updates. Then, the user will be
asked whether one particular available file should be downloaded. If
the user agrees, the file is downloaded, copied into the correct
BANKDATA_PATH, and converted into ktoblzcheck's format. Since
ktoblzcheck-1.35 this downloaded file will automatically be used as
soon as its validity date starts.

The bankdata.txt file used by ktoblzcheck contains less information
than the file provided by the Bundesbank. Namely, it contains only
four tab-delimited columns and only those lines that refer to the main
institutes instead of all branches. The provided sed script
src/bankdata/bundesbank.sed (provided by Daniel Gloeckner
<daniel-gl@gmx.net>) will automatically convert the Bundesbank's ascii
file into the required ktoblzcheck format.

If you got the Bundesbank BLZ file in excel format, the four columns
for bankdata.txt are A, O, G, J, in that order, and it has only those
lines which have a '1' in column B.


Authors
-------

The original author was Fabian Kaiser <fabian@openhbci.de>. The
current maintainer is Christian Stimming <stimming@tuhh.de> and
Alexander Kurz <sf2@blala.de>.

For contacting the authors, please write to the mailing list
<aqbanking-general@sourceforge.net>. This list is subscriber-only which
means you need to subscribe if you want to post to the
list. Subscription information can be found on
http://lists.sourceforge.net/lists/listinfo/aqbanking-general


Related projects
----------------

A ruby interface to ktoblzcheck:
http://www.vdp-software.com/Rbktoblzcheck/

A different implementation of this checking algorithms:
http://www.informatik.fh-mannheim.de/konto_check/
