From 674e4b8b9e0fa5a303a8cf342df1160d790d5cc7 Mon Sep 17 00:00:00 2001 From: Philipp Falk Date: Thu, 29 Sep 2016 13:00:08 +0200 Subject: [PATCH] bibtex2mathhtml.py: * more english translations * added disclaimer * fixed links in _bib.html file * reverse numbers for publications --- bibtex2mathhtml.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/bibtex2mathhtml.py b/bibtex2mathhtml.py index c2869b9..4427b23 100755 --- a/bibtex2mathhtml.py +++ b/bibtex2mathhtml.py @@ -22,13 +22,13 @@ def get_publications(dirname, category, basename): filename = '{}.bib'.format(category) if not os.path.exists(filename): return (None, None) - cmd = ['bibtex2html', '-q', '--no-doc', '--no-header', + cmd = ['bibtex2html', '-q', '--no-doc', '--no-header', '--revkeys', filename] subprocess.check_call(cmd) with open('{}.html'.format(filename.rsplit('.', 1)[0]), 'r') as f: html = f.read().split('
')[0].strip().replace('{}_bib.html'.format(category), '{}_bib.html'.format(basename)) with open('{}_bib.html'.format(filename.rsplit('.', 1)[0]), 'r') as f: - bib = f.read().split('
')[0].strip().split('\n\n', 2)[2] + bib = f.read().split('
')[0].strip().replace('{}.html'.format(category), '{}.html'.format(basename)).split('\n\n', 2)[2] return (html, bib) if __name__ == '__main__': @@ -38,23 +38,23 @@ if __name__ == '__main__': basename = 'pubs' categories = ['preprints', 'articles', 'books', 'proceedings', 'theses'] - catnames = ['Preprints', 'ZeitschriftenartikelJournal articles', 'BücherBooks', 'Proceedings', 'AbschlussarbeitenTheses'] + catnames = ['Preprints', 'ZeitschriftenartikelJournal articles', 'BücherBooks', 'KonferenzbeiträgeProceedings', 'AbschlussarbeitenTheses'] outhtml = [] outbibl = [] - outhtml.append('% use aam ueberschrift="Publikationen"') + outhtml.append('% use aam ueberschrift="PublikationenPublications"') outbibl.append('% use aam ueberschrift="BibTeX"') - outhtml.append('
') outhtml.append('
') outhtml.append('') - outhtml.append('
') outhtml.append('
') + outhtml.append('

Bitte beachten Sie, dass die verlinkten PDF-Dateien von den veröffentlichten Versionen abweichen können.Please note, that the provided pdf-files might differ from published versions.

') + for (cat, name) in zip(categories, catnames): (html, bib) = get_publications(os.getcwd(), cat, basename) if html is None: -- 2.11.0