Capture more than just " /" from 245$h tools_current
authorDan Scott <dan@coffeecode.net>
Tue, 7 Apr 2020 20:22:28 +0000 (16:22 -0400)
committerDan Scott <dan@coffeecode.net>
Tue, 7 Apr 2020 20:22:28 +0000 (16:22 -0400)
"‡h[microform] :" happens too

Signed-off-by: Dan Scott <dan@coffeecode.net>
tools/ebooks/prep_ebook_records.py

index d04e650..31dfdf2 100755 (executable)
@@ -605,10 +605,10 @@ def process_fields(record, options):
         # Strip out GMD
         elif field.tag == "245":
             if "h" in field:
-                # Grab the trailing " /"
+                # Grab the trailing " /" or " :" or whatever
                 suffix = field["h"][-2:]
                 field.delete_subfield("h")
-                if suffix == " /":
+                if suffix != "].":
                     field["a"] = field["a"] + suffix
             new_record.add_ordered_field(field)
         else: