0.01
No commit activity in last 3 years
No release in over 3 years
A set of enhancements to ruby-marc to make parsing MARC data easier
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies

Runtime

>= 0
>= 0
 Project Readme

Enhanced MARC is a set of classes, modules and methods that sit on top of ruby-marc (https://github.com/ruby-marc/ruby-marc) to help parse the contents of MARC records more easily and conveniently.

Build Status

Installation: sudo gem install enhanced_marc

Usage:

  require 'enhanced_marc'

  reader = MARC::Reader.new('marc.dat')

  records = []

  reader.each do | record |
    records << record
  end

Note: enhanced-marc only works directly with MARC::Reader. If you want to use it with MARCXML or MARC-JSON, etc. you'll need to do something like:

  reader.each do | record |
    records << record.to_typed_record
  end

for the same effect

  >> 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"]