Nice work Ross! Users of rubymarc might like to see the performance
enhancements that motivated you to do the nokogiri integration:
http://paste.lisp.org/display/87529
!!!
//Ed
On Wed, Sep 23, 2009 at 10:51 PM, Ross Singer <[log in to unmask]> wrote:
> Hi everybody,
>
> Apologies for the crossposting.
>
> I wanted to let people know that Ruby MARC 0.3.0 was just released as
> a gem. This version addresses the biggest complaint about Ruby MARC,
> which was the fact that it could only parse MARCXML with REXML, Ruby's
> native XML parser (which, if you've used it, you hate it).
>
> Now you can use Nokogiri (http://nokogiri.rubyforge.org/) or, if
> you're using JRuby, jrexml instead of REXML, if you want.
>
> This release *shouldn't* break anything.
>
> The rubyforge project is here:
> http://rubyforge.org/projects/marc
> The rdocs are here:
> http://marc.rubyforge.org/
> The source is here:
> http://marc.rubyforge.org/svn/
>
> To install:
> sudo gem install marc
>
> While I'm making MARC and Ruby related announcements, I'd like to
> point out a project I released a couple of weeks ago that sits on top
> of Ruby MARC, called enhanced-marc. It's basically a domain specific
> language for working with the MARC fixed fields and providing a set of
> objects and methods to more easily parse what the record is
> describing.
>
> For example:
>
> require 'enhanced_marc'
>
> reader = MARC::Reader.new('marc.dat')
>
> records = []
>
> reader.each do | record |
> records << record
> end
>
> >> records[0].class
> => MARC::BookRecord
>
> >> records[0].is_conference?
> => false
>
> >> records[0].is_manuscript?
> => false
>
> # Send a boolean true if you want human readable forms, rather than
> MARC codes.
> >> records[0].literary_form(true)
> => "Non-fiction"
>
> >> records[0].nature_of_contents(true)
> => ["Bibliography", "Catalog"]
>
> >> records[1].class
> => MARC::SoundRecord
>
> >> records[1].composition_form(true)
> => "Jazz"
>
> >> records[2].class
> => MARC::MapRecord
>
> >> records[2].projection(true)
> => ["Cylindrical", "Mercator"]
>
> >> records[2].relief(true)
> => ["Color"]
>
> The enhanced-marc project is here:
> http://github.com/rsinger/enhanced-marc
>
> To install it:
> gem sources -a http://gems.github.com
> sudo gem install rsinger-enhanced_marc
>
> Let me know if you have any problems or suggestions with either of these.
>
> Thanks!
> -Ross.
>
|