diff --git a/modules/bibformat/lib/elements/bfe_references.py b/modules/bibformat/lib/elements/bfe_references.py index 540d18a57..07b6ca377 100644 --- a/modules/bibformat/lib/elements/bfe_references.py +++ b/modules/bibformat/lib/elements/bfe_references.py @@ -1,69 +1,67 @@ # -*- coding: utf-8 -*- """BibFormat element - Prints references""" import re from invenio.messages import gettext_set_language def format(bfo): """ Print host (Order: Name of publisher, place of publication and date of publication). """ _ = gettext_set_language(bfo.lang) output = [] epflid = bfo.field('037__a').strip() if epflid: output.append(epflid) doi = bfo.field('0247_a').strip() if doi: doi_re = re.compile(r'(10.(\d)+/(\S)+)') if doi_re.search(doi): output.append('doi:%s' % (doi, doi)) # show patent search ? if bfo.field('013__a'): - bfo.field('013__b') - patent_to_search = bfo.field('013__a') - url = "http://worldwide.espacenet.com/searchResults?compact=false&PN=%s&ST=advanced&locale=en_EP&DB=EPODOC" % (str(bfo.field('013__b')) + str(bfo.field('013__a'))) + url = "http://worldwide.espacenet.com/searchResults?compact=false&PN=%s&ST=advanced&locale=en_EP&DB=EPODOC" % str(bfo.field('013__a')) output.append('%s' % (url, _("Search this record in European Patent Office"))) external = bfo.fields('035__a') control_nb_re = re.compile(r'(?P[\w:_,.\-_/]+)\s*\((?P[a-z\s]+)\)', re.I) for ext in external: match = control_nb_re.match(ext) if match: extra_id = match.group('id') cataloger = match.group('cataloger') if cataloger == 'ISI': url = 'http://ws.isiknowledge.com/cps/openurl/service?url_ver=Z39.88-2004&rft_id=info:ut/%s' % extra_id output.append('%s' % (url, _("View record in Web of Science"))) elif cataloger == 'Scopus': url = 'http://www.scopus.com/scopus/openurl/link.url?ctx_ver=Z39.88-2004&rfr_id=http://infoscience.epfl.ch&rft_id=info:eid/%s' % extra_id output.append('%s' % (url, _("View record in Scopus"))) elif cataloger == 'PMID': url = 'http://www.ncbi.nlm.nih.gov/sites/entrez?cmd=Retrieve&db=PubMed&list_uids=%s&dopt=Abstract' % extra_id output.append('%s' % (url, _("View record in PubMed"))) elif cataloger == 'arXiv': url = 'http://www.arxiv.org/openurl-resolver?rft_id=%s&url_ver=Z39.88-2004' % extra_id output.append('%s' % (url, _("View record in arXiv"))) elif cataloger == 'EV': pass elif cataloger == 'SzZuIDS NEBIS': if bfo.lang == 'fr': url = 'http://library.epfl.ch/nebis-redir/?record=%s' % extra_id else: url = 'http://library.epfl.ch/en/nebis-redir/?record=%s' % extra_id output.append('%s' % (url, _("Print copy in library catalog"))) return ''.join(['
  • %s
  • ' % elem for elem in output]) def escape_values(bfo): """ Called by BibFormat in order to check if output of this element should be escaped. """ - return 0 \ No newline at end of file + return 0