BLZ—Bankleitzahlen in Ruby

Description

BLZ or Bankleitzahlen is a bank identifier code system used by German and Austrian banks (see Wikipedia).

This gem provides for searching and returning the information represented by the BLZ, such as the name of the bank etc.

Installation

$ gem install blz

Command line tools

I provided a command line tool to search for BLZ:

blz exact 70150000

70150000, Stadtsparkasse M

Or search for BIC matches:

blz bic SSKMDE

70150000, Stadtsparkasse M

Or use substring matches:

blz match 4945

49450120, Sparkasse Herford, 32045 Herford, WLAHDE44XXX
49450120, Sparkasse Herford, 32285 R

Or find by city (rather uncommon, but useful):

blz city M

Downloads

You can download the current list of BLZ (free of charge) from the German Bundesbank.

The Bundesbank releases a new list every three months. The last part of the version number of this gem mirrors the last date the provided data is valid.

Now go and build your own BLZ gem ;-)

Note on converting

One of the easiest ways to contribute is by updating the data/*.tsv.gz files. Currently, this is a 3-monthly manual process of:

  1. Downloading the file linked above (it helps to be subscribed to the Bundesbank ExtraNet INTBA mailing list to get notifications, but the registration process is a bit cumbersome...).

  2. Converting the BLZ_yyyymmdd.xlsx file into a tab seperated format (plain old CSV format with \t as field seperator; omit the header). Save it as data/yyyy_mm_dd.tsv

  3. Gzip'ing the .tsv file (i.e. gzip -9 yyyy_mm_dd.tsv, resulting in data/yyyy_mm_dd.tsv.gz).

  4. Modify the test_current_data_file method in test/test_bank.rb to reflect the latest file.

  5. Run the tests (rake).

Obviously, this process tends to be error prone. A pull request with a Rake task completing these steps would be nice to have.

Contributors

License

Released under the MIT License. See the LICENSE file for further details.