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('<hr>')[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('<hr>')[0].strip().split('\n\n', 2)[2]
+ bib = f.read().split('<hr>')[0].strip().replace('{}.html'.format(category), '{}.html'.format(basename)).split('\n\n', 2)[2]
return (html, bib)
if __name__ == '__main__':
basename = 'pubs'
categories = ['preprints', 'articles', 'books', 'proceedings', 'theses']
- catnames = ['Preprints', '<de>Zeitschriftenartikel</de><en>Journal articles</en>', '<de>Bücher</de><en>Books</en>', 'Proceedings', '<de>Abschlussarbeiten</de><en>Theses</en>']
+ catnames = ['Preprints', '<de>Zeitschriftenartikel</de><en>Journal articles</en>', '<de>Bücher</de><en>Books</en>', '<de>Konferenzbeiträge</de><en>Proceedings</en>', '<de>Abschlussarbeiten</de><en>Theses</en>']
outhtml = []
outbibl = []
- outhtml.append('% use aam ueberschrift="Publikationen"')
+ outhtml.append('% use aam ueberschrift="<de>Publikationen</de><en>Publications</en>"')
outbibl.append('% use aam ueberschrift="BibTeX"')
- outhtml.append('<hr />')
outhtml.append('<div class="contents-vertical">')
outhtml.append('<ul>')
for (cat, name) in zip(categories, catnames):
outhtml.append('<li><a href="#{}">{}</a>'.format(cat, name))
outhtml.append('</ul>')
- outhtml.append('<hr />')
outhtml.append('</div>')
+ outhtml.append('<p><de>Bitte beachten Sie, dass die verlinkten PDF-Dateien von den veröffentlichten Versionen abweichen können.</de><en>Please note, that the provided pdf-files might differ from published versions.</en></p>')
+
for (cat, name) in zip(categories, catnames):
(html, bib) = get_publications(os.getcwd(), cat, basename)
if html is None: