)
new_record.add_field(note)
+ add_cat_source(new_record, options)
+
+ writer.write(new_record)
+
+def add_cat_source(record, options):
+ """Add or extend the 040 field to identify the cataloguing source"""
+
+ # Only Windsor wants to do this
+ if 'windsor' not in options['libraries']:
+ return
+
+ cat_source = record['040']
+ if cat_source:
+ # Add subfield 'd' identifying Windsor
+ cat_source.add_subfield('d', 'CaOWA')
+ else:
+ # Add a 040 with subfield 'd' identifying Windsor
forty = pymarc.Field(tag = '040',
indicators = [' ', ' '],
- subfields = [ 'a', 'CaOWA' ]
+ subfields = [ 'd', 'CaOWA' ]
)
- new_record.add_field(forty)
+ record.add_field(forty)
- writer.write(new_record)
def process_urls(field, options):
"""Creates 856 fields required by Conifer"""