Created
December 27, 2011 06:33
-
-
Save mark-cooper/1522871 to your computer and use it in GitHub Desktop.
Cataloging database maintenance: find circulating titles with acquisition records
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'marc_tools' | |
# https://github.com/mark-cooper/marc_tools | |
# SCL branches (to exclude consortial partner branches) | |
BRANCHES = [ | |
'cent', | |
'clov', | |
'fore', | |
'guer', | |
'heal', | |
'nort', | |
'occi', | |
'peta', | |
'rinc', | |
'rohn', | |
'seba', | |
'sono', | |
'wind', | |
'ext', | |
] | |
MARC::ForgivingReader.new('records/dvd.mrc').each do |r| | |
r = MarcTools::MarcRecordWrapper.new(r) | |
check = false | |
r.grab('949').each do |item| | |
check = true if item['a'] != 'r' and BRANCHES.include? item['m'] | |
end | |
puts r.title if check | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment