Remove Windsor options from book script
authorDan Scott <dscott@laurentian.ca>
Mon, 14 Mar 2016 16:54:57 +0000 (12:54 -0400)
committerDan Scott <dscott@laurentian.ca>
Mon, 14 Mar 2016 16:54:57 +0000 (12:54 -0400)
Signed-off-by: Dan Scott <dscott@laurentian.ca>
tools/ebooks/prep_ebook_records.py

index f3220cd..de7d6f0 100755 (executable)
@@ -67,18 +67,6 @@ class Institution():
             "access_note": "Access restricted to users with a valid Laurentian University ID ;" \
         }
 
-        self.windsor = { \
-            "code": "WINDSYS", \
-            "lac_symbol": "OWA", \
-            "org_unit": "106", \
-            "ebrary_code": "oculwindsor", \
-            "gale_code": "wind05901", \
-            "proxy": "http://ezproxy.uwindsor.ca/login?url=", \
-            "link_text": "Available online", \
-            "sfx_url": "http://sfx.scholarsportal.info/windsor", \
-            "access_note": "Access restricted to users with a valid University of Windsor ID ;" \
-        }
-
     def get_settings(self, lib):
         """Return the settings for a library by name"""
         return getattr(self, lib)
@@ -134,8 +122,6 @@ Required arguments:
 
     -L / --laurentian: Add an 856 for Laurentian University
 
-    -W / --windsor : Add an 856 for University of Windsor
-
 Optional arguments:
     -C / --clean : Try to clean up diacritics - some of the records we get
                    have corrupted diacritics.
@@ -162,7 +148,7 @@ Optional arguments:
     -h / --help : Prints help message
 
 Examples:
-    %s --algoma --windsor -i crkn.mrc -o /tmp/crkn_out.mrc -p "eBrary Inc."
+    %s --algoma -i crkn.mrc -o /tmp/crkn_out.mrc -p "eBrary Inc."
     ''' % sys.argv[0]
     sys.exit(0)
 
@@ -188,7 +174,6 @@ def consolidate_options(opts):
         '-A': '--algoma',
         '-B': '--boreal',
         '-L': '--laurentian',
-        '-W': '--windsor',
         '-s': '--sample',
         '-h': '--help'
     }
@@ -380,7 +365,7 @@ def check_libraries(options):
     """Build a dict of the libraries that were requested for this batch"""
 
     _libraries = dict()
-    for lib in ['algoma', 'boreal', 'laurentian', 'windsor']:
+    for lib in ['algoma', 'boreal', 'laurentian']:
         if '--' + lib in options:
             _libraries[lib] = True
 
@@ -393,7 +378,7 @@ def parse_opts():
         _short_opts = 'i:o:a:c:p:P:ABLWeCI:d:F:T:t:u:n:s:h'
         _long_opts = ['input=', 'output=', 'authorization=', 'consortium=',
             'publisher=', 'platform=', 'algoma', 'boreal', 'laurentian',
-            'windsor', 'ebrary', 'clean', 'isbn-sfx', 'duplicate=',
+            'ebrary', 'clean', 'isbn-sfx', 'duplicate=',
             'from-format=', 'to-format=', 'tcn=', 'url=', 'note=', 'sample=',
             'help'
         ]
@@ -923,19 +908,19 @@ def append_space_semi_space(note):
 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']:
+    # Only do this for Laurentian
+    if 'laurentian' not in options['libraries']:
         return
 
     cat_source = record['040']
     if cat_source:
-        # Add subfield 'd' identifying Windsor
-        cat_source.add_subfield('d', 'CaOWA')
+        # Add subfield 'd' identifying Laurentian
+        cat_source.add_subfield('d', 'CaOSUL')
     else:
-        # Add a 040 with subfield 'd' identifying Windsor
+        # Add a 040 with subfield 'd' identifying Laurentian
         forty = pymarc.Field(tag = '040',
             indicators = [' ', ' '],
-            subfields = [ 'd', 'CaOWA' ]
+            subfields = [ 'd', 'CaOSUL' ]
         )
         record.add_ordered_field(forty)