marcup is a small library for incrementally storing MARC data. As a subscriber
to some sort of MARC feed you often need the ability to start with a given 
batch of MARC data, and apply incremental updates which create, update, delete 
records from the original baseline batch. 

To install marcup you should be able to:

  % easy_install marcup

After that you should be able to:

  % marcup load batch.dat

And then later to:

  % marcup load icremental.dat

And if you want a snapshot of the store in MARC21 you can:

  % marcup dump > snapshot.dat

If you want to write your own program to work with the store you can:
 
  import marcup
  import pymarc

  store = marcup.Store()
  record = pymarc.Record()
  record.fields.append(pymarc.Field('001', '99043581'))
  record.fields.append(pymarc.Field('245', ('1', '4'), ('a', 'The Pragmatic Progammer'))
  store.post(record)
  store.get('99043581') # where identifier is the id in the record 001 field
  store.put(record)
  store.delete(record)

  # yea, I've been thinking about REST too much lately :)


If you want the source code (unlikely since you're reading this):

  % bzr branch http://inkdroid.org/bzr/marcup


Comments, questions, quibbles, ideas to:

  Ed Summers <ehs@pobox.com>
