Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
A set of convenience methods (a la Ruby Facets) on top of ruby-marc to more easily parse the actual data inside the MARC record.
Ruby
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
lib Bug in BookType#is_manuscript?: need to check the value of the Contro…
pkg Updated gem
test Initial import into github -- also refactored from a branch of ruby-m…
Changes
LICENSE Initial import into github -- also refactored from a branch of ruby-m…
README
Rakefile Cleaned up a typo in BookType
VERSION Version bump to 0.2.0
enhanced_marc-0.1.gem Another stab at this gemspec
enhanced_marc.gemspec Updated gemspec

README

Enhanced MARC is a set of classes, modules and methods that sit on top of ruby-marc (http://rubyforge.org/projects/marc) to help parse the contents of MARC records more easily and conveniently.
Installation:
  gem sources -a http://gemcutter.org
  sudo gem install enhanced_marc
  
Usage:

  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"]
  
  
  
  
Something went wrong with that request. Please try again.