From d413eed86d10d03ac5a744d9bdf1274fa2172530 Mon Sep 17 00:00:00 2001 From: Ray Schwartz Date: Sat, 24 Aug 2024 17:42:13 -0400 Subject: [PATCH] Another update. Added 546 and 520 tags. --- marc3h.py | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/marc3h.py b/marc3h.py index 5fbec21..4e0e58e 100644 --- a/marc3h.py +++ b/marc3h.py @@ -66,6 +66,19 @@ def stub(dc): record.add_ordered_field(field010) + for att in dc.book.attributes: + if att.fk_attriblist == 20: + + field010 = pymarc.Field( + tag='020', + indicators=[' ', ' '], + subfields=[ + Subfield(code='a', value=str(att.text)), + ] + ) + record.add_ordered_field(field020) + + field040 = pymarc.Field( tag='040', indicators=[' ', ' '], @@ -201,6 +214,32 @@ def stub(dc): ) record.add_ordered_field(field508) + for att in dc.book.attributes: + if att.fk_attriblist == 520: + + field508 = pymarc.Field( + tag='520', + indicators=[' ', ' '], + subfields=[ + Subfield(code='a', value=str(att.text)), + ] + ) + record.add_ordered_field(field520) + + for att in dc.book.attributes: + if att.fk_attriblist == 546: + + field508 = pymarc.Field( + tag='546', + indicators=[' ', ' '], + subfields=[ + Subfield(code='a', value=str(att.text)), + ] + ) + record.add_ordered_field(field546) + + + for subject in dc.subjects: field653 = pymarc.Field(