record.add_ordered_field(note)
add_marc_source(record, options) # 598
+ add_rda_fields(record, options) # 336,337,338
publisher = add_publisher(record, options) # 710
add_restriction(record, options, publisher) # 506
add_platform(record, options) # 710
data=field.value()[:23] + 's' + field.value()[24:]
)
new_record.add_ordered_field(fixed_field)
+ # Strip out GMD
+ elif field.tag == '245':
+ if 'h' in field:
+ suffix = field['h'][-3:]
+ field.delete_subfield('h')
+ field['a'] = field['a'] + suffix
+ new_record.add_ordered_field(field)
else:
new_record.add_ordered_field(field)
)
record.add_ordered_field(forty)
+def add_rda_fields(record, options):
+ """
+ Add 336,337,338 fields identifying the content as an ebook
+ """
+ content = pymarc.Field(tag = '336',
+ indicators = [' ', ' '],
+ subfields = [
+ 'a', 'text',
+ 'b', 'txt',
+ '2', 'rdacontent',
+ '0', 'http://id.loc.gov/vocabulary/contentTypes/txt'
+ ]
+ )
+ media = pymarc.Field(tag = '337',
+ indicators = [' ', ' '],
+ subfields = [
+ 'a', 'computer',
+ 'b', 'c',
+ '2', 'rdamedia',
+ '0', 'http://id.loc.gov/vocabulary/mediaTypes/c'
+ ]
+ )
+ carrier = pymarc.Field(tag = '338',
+ indicators = [' ', ' '],
+ subfields = [
+ 'a', 'online resource',
+ 'b', 'cr',
+ '2', 'rdacarrier',
+ '0', 'http://id.loc.gov/vocabulary/carriers/cr'
+ ]
+ )
+ record.add_ordered_field(content)
+ record.add_ordered_field(media)
+ record.add_ordered_field(carrier)
+
def add_marc_source(record, options):
"""
Add a 598 field identifying the source MARC file name and processing date