projects
/
contrib
/
Conifer.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2f78b06
)
Capture more than just " /" from 245$h
tools_current
author
Dan Scott
<dan@coffeecode.net>
Tue, 7 Apr 2020 20:22:28 +0000
(16:22 -0400)
committer
Dan 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
patch
|
blob
|
history
diff --git
a/tools/ebooks/prep_ebook_records.py
b/tools/ebooks/prep_ebook_records.py
index
d04e650
..
31dfdf2
100755
(executable)
--- a/
tools/ebooks/prep_ebook_records.py
+++ b/
tools/ebooks/prep_ebook_records.py
@@
-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: