commit 48e6075fad49d4241e9b142b1922093d8e3f1c98
parent 2a9f117622f21b27415d616d6bc6fd8b3ec76ff6
Author: Antoine Amarilli <a3nm@a3nm.net>
Date: Wed, 6 Jan 2021 22:03:04 +0100
actually support hiding non-oa venues
Diffstat:
2 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/make_talks_html.py b/make_talks_html.py
@@ -62,9 +62,11 @@ def makevenue2(venue, lang, typ, url, issue, links=True, hidden=False):
year = venue[-4:]
except IndexError:
pass
+ if year.isdigit() and len(issuetext) == 0:
+ issuetext = ', %s' % year
return (stz['published at non oa'][lang] % stz[typ][lang]
- + (", " + year if year and year.isdigit() else "") +
- '<a href="/work/research/openaccess/#PublishNonOA">' +
+ + issuetext +
+ ' <a href="/work/research/openaccess/#PublishNonOA">' +
stz['oaexplain'][lang] + '</a>'
)
if len(urltext) > 0 and links:
@@ -74,7 +76,7 @@ def makevenue2(venue, lang, typ, url, issue, links=True, hidden=False):
def makevenue(publi, lang, links=True, hidenonoa=False):
global venuesz
venue, typ, url, issue, oa, keywords = getvenue(publi, lang, venuesz)
- return makevenue2(venue, lang, typ, url, issue, links=links, hidden=(not oa and hidenonoa))
+ return makevenue2(venue, lang, typ, url, issue, links=links, hidden=((not oa) and hidenonoa))
def makesuppl(publi, lang, ismain=False):
global stz
diff --git a/parserec.py b/parserec.py
@@ -40,8 +40,8 @@ stz = {
'fr': "une revue",
},
'published at non oa': {
- 'en': "published at a closed-access %s",
- 'fr': "publié dans %s non accessible en libre accès",
+ 'en': "Published at a closed-access %s",
+ 'fr': "Publié dans %s non accessible en libre accès",
},
'oaexplain': {
'en': "[why?]",
@@ -229,7 +229,7 @@ def getvenue(publi, lang, venuesz, short=False):
lvenue = 'venue' + lang
if lvenue in publi.keys():
venue = publi[lvenue]
- return (venue, typ, url, publi.get('issue', ''), oa, keywords)
+ return (venue, typ, url, publi.get('issue', ''), oa in ['yes', 'n/a'], keywords)
def parse(fname):
with open(fname, 'r') as f: