BAI Parser
Ruby BAI2 Bank File parser. Takes a bank file as input and outputs the data as a Ruby hash. You can then use a custom writer class to output the data as needed for your purposes.
Installation
Add this line to your application's Gemfile:
gem 'bai_parser'
And then execute:
$ bundle
Or install it yourself as:
$ gem install bai_parser
Usage
require "bai_parser"
data = BaiParser::Parser.parse "BAI-File-From-Bank.bai"
# or
data = BaiParser::Parser.parse file_contents_from_bai_file
# Then you can use a custom writer to output the data as needed such as to a csv file
MyCustomBAIWriter.write data
# For a quick test to see the parsed data, run the executable against your data file and it will print the data to the screen
bai_parse bai-file.txt
Contributing
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request