Skip to content

Instantly share code, notes, and snippets.

@edsu
Forked from nahuelange/gist:d36c15d57e82c6e006b4
Last active December 28, 2015 10:19
Show Gist options
  • Save edsu/f8f0e33afcbbcaf7d194 to your computer and use it in GitHub Desktop.
Save edsu/f8f0e33afcbbcaf7d194 to your computer and use it in GitHub Desktop.
#!/usr/bin/env python
from pymarc import Record, Field, MARCReader
r1 = Record(force_utf8=True)
a = '0' * 9995
f = Field('100', "##")
f.add_subfield('a', a)
r1.add_ordered_field(f)
r1.add_ordered_field(f)
marc21 = r1.as_marc()
r2 = MARCReader(marc21).next()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment