Has anyone written any Ruby libraries for working with Cato's Deep Bills Project?
Since Deepbills is based on the official XML that Congress publishes, I think it'd be pretty easy to add support for passing through Deepbills' extra tags and attributes to the Ruby gem I made for working with Congress' bills, us-documents:
It's a tool for stripping a lot of tags out of Congress' bill XML, and giving you semantic-less HTML that can be integrated and styled much more easily than the original XML.
Adding support for Deepbills might be as simple as adding new names to the whitelist of tags to preserve.
Disclosure: I'm the consultant currently working on the Deepbills project with Cato.
Short answer: not that we are currently aware of.
Let me ask - in what way do you wish to work with the data? If you mean retrieval of the marked-up documents then that can be done via JSON for individual documents, though that would be horribly painful for large quantities - it's meant as a way to do differentials from the compressed complete download. Both methods are described here.
If you mean actually doing work with the XML and extracting information then you may wish to accomplish this with XSL rather than Ruby. There are some sample scripts that we use against the files to create some documents for use on Wikipedia and you can find them here.
For the most recent set of extracts I have actually been using XSL to create documents that I then process with Perl; while some of these operations are certainly possible with XSL/XQuery, I'm quicker in Perl and I find the result less brittle for ongoing maintenance & some prototyping. So I have done some simple outputs with XSL into a form that lends itself well to regex parsing and then done multi-pass work on that intermediate output.
You may find that a similar approach would work well for you if you wish to stick with Ruby. Simply use the JSON retrieval format to get an individual bill and apply a transform, perhaps with the xslt gem, using some of our XSL as an inspiration.
Yes, I released an initial gem, Catobills, last weekend. It doesn't take advantage of all of the XML markup, but it's a start.