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:
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...).
Converting the
BLZ_yyyymmdd.xlsxfile into a tab seperated format (plain old CSV format with\tas field seperator; omit the header). Save it asdata/yyyy_mm_dd.tsvGzip'ing the
.tsvfile (i.e.gzip -9 yyyy_mm_dd.tsv, resulting indata/yyyy_mm_dd.tsv.gz).Modify the
test_current_data_filemethod intest/test_bank.rbto reflect the latest file.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.