Changes

Jump to: navigation, search

Ruby-marc

289 bytes added, 03:05, 21 March 2009
no edit summary
Rdocs are here: [http://marc.rubyforge.org http://marc.rubyforge.org]
It can be These are some recipes for useful to play around with a library in irb before things you try might want to write a real app do with it. Here are some irb examplesruby-marc. If you need a file of MARC records to work with, you can download one from here: [http://www.archive.org/search.php?query=mediatype%3A%22data%22%20MARC http://www.archive.org/search.php?query=mediatype%3A%22data%22%20MARC].  ==== Recipe: read in a large file of marc records, pull out one of them and write it to a separate file ====<pre>require 'rubygems'require 'marc' reader = MARC::Reader.new('/usr/local/projects/bl-demo/data/lc_records.utf8.mrc')record = reader.firstwriter = MARC::Writer.new('/tmp/file2')writer.write(record)writer.close</pre>
98
edits

Navigation menu