Ensure the leader says we are a text record
authorDan Scott <dscott@laurentian.ca>
Tue, 17 Apr 2018 18:08:29 +0000 (14:08 -0400)
committerDan Scott <dscott@laurentian.ca>
Tue, 17 Apr 2018 18:08:29 +0000 (14:08 -0400)
Of course, we might want to revisit this with an option to support serials as
well.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
tools/ebooks/prep_ebook_records.py

index d386d79..becf553 100755 (executable)
@@ -469,7 +469,8 @@ def process_fields(record, options):
     """Decide which fields to add, delete, and keep"""
 
     new_record = pymarc.Record(to_unicode=True, force_utf8=True)
-    new_record.leader = record.leader
+    leader = record.leader[:6] + 'a' + record.leader[7:]
+    new_record.leader = leader
 
     add_cat_source(record, options) # 040