From: Dan Scott Date: Fri, 24 Feb 2012 05:44:19 +0000 (-0500) Subject: Update codes for new located URI scoping behaviour X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=d93bf6219217331f2b2cc26d410f01d5078e769b;p=contrib%2FConifer.git Update codes for new located URI scoping behaviour Signed-off-by: Dan Scott --- diff --git a/tools/ebooks/prep_ebook_records.py b/tools/ebooks/prep_ebook_records.py index 597b82f3fc..f80690d6e3 100644 --- a/tools/ebooks/prep_ebook_records.py +++ b/tools/ebooks/prep_ebook_records.py @@ -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']])