[open-ils-commits] r395 - in servres/trunk/conifer: custom libsystems/evergreen libsystems/z3950 (gfawcett)
svn at svn.open-ils.org
svn at svn.open-ils.org
Sun Apr 26 20:07:07 EDT 2009
Author: gfawcett
Date: 2009-04-26 20:07:07 -0400 (Sun, 26 Apr 2009)
New Revision: 395
Modified:
servres/trunk/conifer/custom/lib_integration.py
servres/trunk/conifer/libsystems/evergreen/item_status.py
servres/trunk/conifer/libsystems/evergreen/support.py
servres/trunk/conifer/libsystems/z3950/yaz_search.py
Log:
changed dwarf references to concat.ca refs. Danger, still too literal...
Modified: servres/trunk/conifer/custom/lib_integration.py
===================================================================
--- servres/trunk/conifer/custom/lib_integration.py 2009-04-26 23:53:46 UTC (rev 394)
+++ servres/trunk/conifer/custom/lib_integration.py 2009-04-27 00:07:07 UTC (rev 395)
@@ -82,9 +82,9 @@
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
Modified: servres/trunk/conifer/libsystems/evergreen/item_status.py
===================================================================
--- servres/trunk/conifer/libsystems/evergreen/item_status.py 2009-04-26 23:53:46 UTC (rev 394)
+++ servres/trunk/conifer/libsystems/evergreen/item_status.py 2009-04-27 00:07:07 UTC (rev 395)
@@ -14,17 +14,17 @@
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 @@
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')
Modified: servres/trunk/conifer/libsystems/evergreen/support.py
===================================================================
--- servres/trunk/conifer/libsystems/evergreen/support.py 2009-04-26 23:53:46 UTC (rev 394)
+++ servres/trunk/conifer/libsystems/evergreen/support.py 2009-04-27 00:07:07 UTC (rev 395)
@@ -11,7 +11,7 @@
# 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 @@
# # 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')
Modified: servres/trunk/conifer/libsystems/z3950/yaz_search.py
===================================================================
--- servres/trunk/conifer/libsystems/z3950/yaz_search.py 2009-04-26 23:53:46 UTC (rev 394)
+++ servres/trunk/conifer/libsystems/z3950/yaz_search.py 2009-04-27 00:07:07 UTC (rev 395)
@@ -82,8 +82,8 @@
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)
More information about the open-ils-commits
mailing list