From: Philipp Falk Date: Thu, 29 Sep 2016 11:00:08 +0000 (+0200) Subject: bibtex2mathhtml.py: X-Git-Url: https://vcs.mathematik.uni-freiburg.de/gitweb//gitweb/index.cgi?a=commitdiff_plain;h=HEAD;p=philipp%2Fscripts bibtex2mathhtml.py: * more english translations * added disclaimer * fixed links in _bib.html file * reverse numbers for publications --- 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: