Update codes for new located URI scoping behaviour
authorDan Scott <dscott@laurentian.ca>
Fri, 24 Feb 2012 05:44:19 +0000 (00:44 -0500)
committerDan Scott <dscott@laurentian.ca>
Tue, 7 May 2013 18:57:42 +0000 (14:57 -0400)
Signed-off-by: Dan Scott <dscott@laurentian.ca>
tools/ebooks/prep_ebook_records.py

index 597b82f..f80690d 100644 (file)
@@ -26,7 +26,7 @@ class Institution():
     def __init__(self):
         """Initialize the Institution object"""
         self.algoma = { \
-            "code": "OSTMA", \
+            "code": "ALGOMASYS", \
             "ebrary_code": "algomauca", \
             "proxy": "http://libproxy.auc.ca/login?url=", \
             "link_text": "Available online", \
@@ -35,15 +35,15 @@ class Institution():
         }
 
         self.boreal = { \
-            "code": "OSBO", \
-            "ebrary_code": "boreal", \
+            "code": "BOREALSYS", \
+            "ebrary_code": "ocls", \
             "proxy": "http://ra.ocls.ca/ra/login.aspx?url=", \
             "link_text": "Disponible en ligne", \
             "access_note": u"Accès réservé aux utilisateurs avec un ID valide Collège Boréal ;" \
         }
         
         self.laurentian = { \
-            "code": "OSUL", \
+            "code": "LUSYS", \
             "ebrary_code": "jndlu", \
             "proxy": "https://librweb.laurentian.ca/login?url=", \
             "link_text": "Available online / disponible en ligne", \
@@ -52,7 +52,7 @@ class Institution():
         }
 
         self.windsor = { \
-            "code": "OWA", \
+            "code": "WINDSYS", \
             "ebrary_code": "oculwindsor", \
             "proxy": "http://ezproxy.uwindsor.ca/login?url=", \
             "link_text": "Available online", \
@@ -897,10 +897,10 @@ def get_subfields(field, data):
         url = ebrary_url.group(1) + data['ebrary_code'] + ebrary_url.group(2)
 
     # Only Boreal still wants proxied ebrary links
-    if ebrary and data['ebrary_code'] != 'boreal':
+    if ebrary and data['ebrary_code'] != 'ocls':
         subs.extend(['u', url])
     else:
-        if data['ebrary_code'] == 'boreal' and re.search(r'ra.ocls.ca', field['u']):
+        if data['ebrary_code'] == 'ocls' and re.search(r'ra.ocls.ca', field['u']):
             subs.extend(['u', field['u']])
         else:
             subs.extend(['u', data['proxy'] + field['u']])