From c6b317c36f5b5cc5ff5250b538be77b75b466c5c Mon Sep 17 00:00:00 2001 From: gfawcett Date: Mon, 27 Apr 2009 00:07:07 +0000 Subject: [PATCH] changed dwarf references to concat.ca refs. Danger, still too literal... git-svn-id: svn://svn.open-ils.org/ILS-Contrib/servres/trunk@395 6d9bc8c9-1ec2-4278-b937-99fde70a366f --- conifer/custom/lib_integration.py | 4 ++-- conifer/libsystems/evergreen/item_status.py | 10 +++++----- conifer/libsystems/evergreen/support.py | 4 ++-- conifer/libsystems/z3950/yaz_search.py | 4 ++-- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/conifer/custom/lib_integration.py b/conifer/custom/lib_integration.py index bf9bcb5..cc570a5 100644 --- a/conifer/custom/lib_integration.py +++ b/conifer/custom/lib_integration.py @@ -82,9 +82,9 @@ def bib_id_to_marcxml(bib_id): def cat_search(query, start=1, limit=10): # this is a total hack for conifer. If the query is a Conifer # title-detail URL, then return just that one item. - if query.startswith('http://dwarf'): + if query.startswith('http://concat'): results = marcxml_to_dictionary(I.url_to_marcxml(query), multiples=True) else: - cat_host, cat_db = ('dwarf.cs.uoguelph.ca:2210', 'conifer') + cat_host, cat_db = ('concat.ca:2210', 'conifer') results = yaz_search.search(cat_host, cat_db, query, start, limit) return results diff --git a/conifer/libsystems/evergreen/item_status.py b/conifer/libsystems/evergreen/item_status.py index 61d45c3..709d11e 100644 --- a/conifer/libsystems/evergreen/item_status.py +++ b/conifer/libsystems/evergreen/item_status.py @@ -14,17 +14,17 @@ def bib_id_to_marcxml(bib_id): def url_to_marcxml(url): # this is a hack. Given a opac Title Details url, return marcxml. - if url.startswith('http://dwarf.cs.uoguelph.ca'): + if url.startswith('http://concat.ca'): if 'feed/bookbag' in url: - #eg http://dwarf.cs.uoguelph.ca/opac/extras/feed/bookbag/marcxml-full/60 - #http://dwarf.cs.uoguelph.ca/opac/extras/feed/bookbag/html-full/60 + #eg http://concat.ca/opac/extras/feed/bookbag/marcxml-full/60 + #http://concat.ca/opac/extras/feed/bookbag/html-full/60 marc_url = re.sub(r'(.*/bookbag/)(.*?)(/.*)', r'\1marcxml-full\3', url) xml = urllib2.urlopen(marc_url).read() else: m = re.match(r'.*r=(\d+).*', url) item_id = m and m.group(1) or None if item_id: - marc_url = ("http://dwarf.cs.uoguelph.ca/opac/extras" + marc_url = ("http://concat.ca/opac/extras" "/supercat/retrieve/marcxml/record/" + item_id) xml = urllib2.urlopen(marc_url).read() return xml @@ -32,4 +32,4 @@ def url_to_marcxml(url): if __name__ == '__main__': # from pprint import pprint # print bib_id_to_marcxml(barcode_to_bib_id(31862016799294)) - print url_to_marcxml('http://dwarf.cs.uoguelph.ca/opac/en-US/skin/default/xml/rdetail.xml?r=1082665&t=dylan%20thomas%20ralph&tp=keyword&d=0&hc=14&rt=keyword') + print url_to_marcxml('http://concat.ca/opac/en-US/skin/default/xml/rdetail.xml?r=1082665&t=dylan%20thomas%20ralph&tp=keyword&d=0&hc=14&rt=keyword') diff --git a/conifer/libsystems/evergreen/support.py b/conifer/libsystems/evergreen/support.py index 74fe125..7e8c753 100644 --- a/conifer/libsystems/evergreen/support.py +++ b/conifer/libsystems/evergreen/support.py @@ -11,7 +11,7 @@ import sys, os # where is our evergreen server's opensrf http gateway? -BASE = 'http://dwarf.cs.uoguelph.ca/osrf-gateway-v1' +BASE = 'http://concat.ca/osrf-gateway-v1' LOCALE = 'en-US' # where can I find a copy of fm_IDL.xml from Evergreen? @@ -23,7 +23,7 @@ LOCALE = 'en-US' # # or, if you have a local copy... # FM_IDL_LOCATION = 'file:fm_IDL.xml' -FM_IDL_LOCATION = 'http://dwarf.cs.uoguelph.ca/reports/fm_IDL.xml' +FM_IDL_LOCATION = 'http://concat.ca/reports/fm_IDL.xml' here = lambda s: os.path.join(os.path.dirname(__file__), s) FM_IDL_LOCATION = 'file:' + here('fm_IDL.xml') diff --git a/conifer/libsystems/z3950/yaz_search.py b/conifer/libsystems/z3950/yaz_search.py index d51f534..35a5c7e 100644 --- a/conifer/libsystems/z3950/yaz_search.py +++ b/conifer/libsystems/z3950/yaz_search.py @@ -82,8 +82,8 @@ def search(host, database, query, start=1, limit=None): if __name__ == '__main__': tests = [ - ('dwarf.cs.uoguelph.ca:2210', 'conifer', '@and "Musson" "Evil"'), - ('dwarf.cs.uoguelph.ca:2210', 'conifer', '@and "Denis" "Gravel"'), + ('concat.ca:2210', 'conifer', '@and "Musson" "Evil"'), + ('concat.ca:2210', 'conifer', '@and "Denis" "Gravel"'), ('z3950.loc.gov:7090', 'VOYAGER', '@attr 1=4 @attr 4=1 "dylan"')] for host, db, query in tests: print (host, db, query) -- 2.11.0