diff --git a/papers/pretty.py b/papers/pretty.py index 99d15e0..ccfeb93 100644 --- a/papers/pretty.py +++ b/papers/pretty.py @@ -4,13 +4,15 @@ from color import colored from pybtex.bibtex.utils import bibtex_purify +# A bug in pybtex makes the abbreviation wrong here +# (Submitted with racker ID: ID: 3605659) +# The purification should also be applied to names but unfortunately +# it removes dots which is annoying on abbreviations. def person_repr(p): - return bibtex_purify(' '.join(s for s in [ + return ' '.join(s for s in [ ' '.join(p.first(abbr=True)), - ' '.join(p.middle(abbr=True)), - ' '.join(p.prelast(abbr=False)), ' '.join(p.last(abbr=False)), - ' '.join(p.lineage(abbr=True))] if s)) + ' '.join(p.lineage(abbr=True))] if s) def short_authors(bibentry): @@ -23,6 +25,7 @@ def short_authors(bibentry): except KeyError: # When no author is defined return '' + def bib_oneliner(bibentry): authors = short_authors(bibentry) title = bibtex_purify(bibentry.fields['title'])