diff --git a/modules/bibformat/etc/format_templates/HD_EPFL_default.bft b/modules/bibformat/etc/format_templates/HD_EPFL_default.bft
index a9c4430cb..c01925eef 100644
--- a/modules/bibformat/etc/format_templates/HD_EPFL_default.bft
+++ b/modules/bibformat/etc/format_templates/HD_EPFL_default.bft
@@ -1,92 +1,90 @@
EPFL HTML detailed - default
Detailed format for article, review
FulltextFulltext
Related materialDocuments pertinents
diff --git a/modules/bibformat/lib/elements/bfe_patent.py b/modules/bibformat/lib/elements/bfe_patent.py
index 5e55aa96a..130cb166f 100644
--- a/modules/bibformat/lib/elements/bfe_patent.py
+++ b/modules/bibformat/lib/elements/bfe_patent.py
@@ -1,64 +1,66 @@
# -*- coding: utf-8 -*-
"""BibFormat element - Prints Patent Number"""
def format(bfo, short="no"):
"""
Print Patent information.
"""
# don't show anything at the moment on html brief
# it may a good idea to put an information like "published or granted" like :
# if b1:
# return "Granted/Published patent"
# if a1:
# return "Pending patent"
if short != "no":
return ""
patents = bfo.fields('013')
- template_output_patent_nr = 'Patent :'
+ template_output_patent_nr = 'Patent :'
output = []
# get number with data linked
patents_nr = []
patent_priority_dates = []
# parse
if patents:
outer_list = "%s"
for patent in patents:
if patent.has_key('a'):
- patent_output = patent['a']
+ patent_output = ''
+
+ # add country
+ if patent.has_key('b'):
+ patent_output += patent['b']
+
+ patent_output += patent['a']
# add type of number
if patent.has_key('c'):
patent_output += ' (' + patent['c'] + ')'
- # add country
- if patent.has_key('b'):
- patent_output += ' (' + patent['b'] + ')'
-
patents_nr.append(patent_output)
# prority_dates are not shown, but are the same year as the publication date
# if patent.has_key('d'):
# patent_priority_dates.append(patent['d'])
# format
if patents_nr:
output_patent_nr = []
for patent_nr in patents_nr:
output_patent_nr.append("- %s
" % patent_nr)
output.append(template_output_patent_nr % "".join(output_patent_nr))
return outer_list % "".join(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
diff --git a/modules/bibformat/lib/elements/bfe_references.py b/modules/bibformat/lib/elements/bfe_references.py
index a934c8e86..540d18a57 100644
--- a/modules/bibformat/lib/elements/bfe_references.py
+++ b/modules/bibformat/lib/elements/bfe_references.py
@@ -1,67 +1,69 @@
# -*- 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') and bfo.field('013__b'):
+ 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')))
- output.append('%s' % (url, _("Search this record in European Patent Office")))
+ 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