publist

managing my list of publications, talks, reviews
git clone https://a3nm.net/git/publist/
Log | Files | Refs | README | LICENSE

commit b4038c5a2419991e228ce74cb09b195f6eed2216
parent 8aba9878d124f2a68f7cb9ebe20a11e68756f14f
Author: Antoine Amarilli <a3nm@a3nm.net>
Date:   Fri,  6 Nov 2026 09:59:22 +0100

nohref

Diffstat:
make.sh | 2++
maketex.py | 19++++++++++++-------
2 files changed, 14 insertions(+), 7 deletions(-)

diff --git a/make.sh b/make.sh @@ -15,6 +15,8 @@ fi ./maketex.py en ./maketex.py en bib all > main.bib +./maketex.py en bib all --nohref > main_nohref.bib +./maketex.py en bib all --formal > main_formal.bib ./maketex.py en tex cv > selectpubli_en.tex ./make_talks_html.py authors venues publis talks ./makereviews.py en tex > reviews.tex diff --git a/maketex.py b/maketex.py @@ -23,6 +23,7 @@ parser.add_argument('lang', nargs='?', default='en', help="Language (default: 'e parser.add_argument('fmt', nargs='?', default='tex', help="Format (can be 'tex' for cvitems or 'bib' for bibtex, default: 'tex').") parser.add_argument('thepubli', nargs='?', default="all", help="ID of the specific publication to generate (default: 'all'; can also be 'cv').") parser.add_argument('--formal', action='store_true', help="Add full venue names and page numbers") +parser.add_argument('--nohref', action='store_true', help="Do not put href in bibtex") # Parse arguments args = parser.parse_args() @@ -32,6 +33,7 @@ lang = args.lang fmt = args.fmt thepubli = args.thepubli formal_mode = args.formal +nohref = args.nohref # http://stackoverflow.com/a/1432949 abspath = os.path.abspath(__file__) @@ -55,7 +57,7 @@ def mklinktex(text, url, sep=""): return ('\\href{%s}%s{%s}' % (absurl(url, SITEURL, LOCALURL), sep, text)) def authortotex(author, withurl=False, sepnames=False): - if withurl: + if withurl and not nohref: return mklinktex(authorname(author, sepnames=sepnames), author['url']) else: return authorname(author, sepnames=sepnames) @@ -74,7 +76,10 @@ def venuetotex(venue, url, issue, dropyear=False): pass if issue and not dropyear: venue += ', %s' % issue - l = mklinktex(venue, url) + if not nohref: + l = mklinktex(venue, url) + else: + l = venue if ' ' not in venue: return '\\mbox{%s}' % l return l @@ -84,7 +89,7 @@ def publitotex(publi, lang, venuesz, authorsz): authors = ', '.join(authortotex(authorsz[author], withurl=True) for author in publi['authors'].split(' ')) return("\\cvitem{\\bfseries %s}{%s.\\newline\\emph{%s}%s%s}" % (venuetotex(name, url, - issue), authors, mklinktex(publi['title'], publi['url']), "" if + issue), authors, mklinktex(publi['title'], publi['url']) if not nohref else publi['title'], "" if endswithpunct(publi) else ".", "\\newline " + (publi['awardtex'] if 'awardtex' in publi.keys() else publi['award']) if 'award' in publi.keys() else '')) @@ -159,8 +164,8 @@ def publitobib(publi, lang, venuesz, authorsz): authors = ' and '.join(authortotex(authorsz[author], sepnames=True) for author in publi['authors'].split(' ')) s += ' author = {%s},\n' % authors - s += ' title = {%s},\n' % mklinktex(publi['title'], - publi['url'], sep="\n ") + dalink = mklinktex(publi['title'], publi['url'], sep="\n ") if not nohref else publi['title'] + s += ' title = {%s},\n' % dalink s += ' year = {%s},\n' % str(getyear(publi)) did_note = False if typ == "draft": @@ -169,8 +174,8 @@ def publitobib(publi, lang, venuesz, authorsz): if 'url' in publi.keys() and publi['url'] != "none": s += ' note = {Preprint: \\url{%s}},\n' % (absurl(publi['url'], SITEURL, LOCALURL)) elif typ in ["phdthesis", "mscthesis", "habilitationthesis"]: - s += ' school = {%s},\n' % (mklinktex(publi['school'], - publi['schoolurl'])) + dalink = mklinktex(publi['school'], publi['schoolurl']) if not nohref else publi['school'] + s += ' school = {%s},\n' % (dalink) else: s += ' %s = {%s},\n' % (typetoobjtype[typ], venuetotex(fullname if formal_mode else name, url, issue, True))