Seriously Alpha library of parsers for the Itemized Records found on the fec’s detailed file page:
fec.gov/finance/disclosure/ftpdet.shtml
Most of the interesting bits are in:
FecUtils::ItemizedParsers::Base
To use a particular parser do something like:
>> rows = File.open(File.join(File.dirname(__FILE__), "assets", "itpas2.dta")).read.split("\n") >> parsed_rows = FecUtils::ItemizedParsers::PasParse.all(rows) >> parsed_rows.first.candidate_identification => H2TX23082
-
needs to parse the amount correctly
-
in PasParse needs a coupla column_with_choices
-
needs a parser for “Any Transaction from One Committee to Another”
-
testing is a good idea, I should write more/some tests
-
Fork the project.
-
Make your feature addition or bug fix.
-
Add tests for it. This is important so I don’t break it in a future version unintentionally.
-
Commit, do not mess with rakefile, version, or history. (if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull)
-
Send me a pull request. Bonus points for topic branches.
Copyright © 2010 Jeff Larson. See LICENSE for details.