Thanks to shadowspar for fixing bug that adds electronic resources from the catalog
as physical items (PHYS) instead of URLs and cleaning up URLs that have additional
paramters after the bib id. Academic terms are hardcoded in the integration class
and a long overdue note has been added to README. The next step is to add an actual
admin interface for this.
Signed-off-by: Art Rhyno <art632000@yahoo.ca>
Integration is carried out through an intergration class, for Windsor we use
"conifer.integration.uwindsor.UWindsorIntegration", but this should be defined for your
institution. The "evergreen_example.py" file in the integration directory can be used as a
-model.
+model. The "term_catalogue" function is where the academic terms, e.g. Fall 2013,
+are defined. We need to add an admin interface for this at some point.
barcode = ''
bibid = ''
is_barcode = re.search('\d{14}', query)
+
if query.startswith(self.OPAC_URL):
results = []
# query is an Evergreen URL
results = M.marcxml_to_records(I.url_to_marcxml(query))
else:
# likely template opac
- url_nums = [int(s) for s in query.split('/') if s.isdigit()]
- if len(url_nums) > 0:
- bib_id = url_nums[len(url_nums) - 1]
- results = M.marcxml_to_records(self.bib_id_to_marcxml(bib_id))
-
+ # first seq of digits after a / should be the bibid
+ match = re.search(r'/(\d+)', query)
+ if match:
+ bibid = match.group(1)
+ results = M.marcxml_to_records(self.bib_id_to_marcxml(bibid))
numhits = len(results)
elif is_barcode:
results = []
856$u form an associative array, where $9 holds the institution
codes and $u holds the URLs.
"""
- # TODO: move this to local_settings
+
LIBCODE = 'OWA'
if hasattr(settings, 'EVERGREEN_LIBCODE'):
- # LIBCODE = settings.EVERGREEN_OPAC_URL
- LIBCODE = self.OPAC_URL
+ LIBCODE = settings.EVERGREEN_LIBCODE
try:
dct = M.marcxml_to_dictionary(marc_string)
words = lambda string: re.findall(r'\S+', string)
"""
# TODO: make this algorithmic.
return [
- ('2011S', '2011 Summer', date(2011,5,1), date(2011,9,1)),
- ('2011F', '2011 Fall', date(2011,9,1), date(2011,12,31)),
+ ('2013S', '2013 Summer', date(2013,5,1), date(2013,9,1)),
+ ('2013F', '2013 Fall', date(2013,9,1), date(2013,12,31)),
]
def _campus_info(self, name, *args):