Skip to content
forked from sampsyo/bibble

another BibTeX-to-HTML (with Jinja2 templates)

Notifications You must be signed in to change notification settings

unitn-sml/bibble

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

bibble

A tool that turns a BibTeX file into a webpage through a template of your choice.

You provide:

  • A BibTeX file (mypapers.bib)
  • A template (such as simple.html in this repository)

Then run:

bibble mypapers.bib simple.html > mypapers.html

Installation

Bibble is a plain Python program that you can install in a virtualenv:

$ python3 -m venv venv
$ . venv/bin/activate
(venv)$ pip install -U https://github.com/sampsyo/bibble/
# ...
(venv)$ bibble mypapers.bib simple.html > mypapers.html

Template Format

See simple.html for a full example. Your template file is a plain old Jinja2 template that has access to your bibliographic entries via a variable called entries:

<ul>
  {% for entry in entries %}
    <li>
        {{ entry.persons['author']|author_list }}.
        {{ entry|title }}.
        {{ entry.fields['month'] }}
        {{ entry.fields['year'] }}.
    </li>
  {% endfor %}
</ul>

Bibble provides several convenience functions such as author_list via Jinja2's filter mechanism. See simple.html to see them all used.

How it Works

Bibble parses a BibTeX file with Pybtex and sends the result through the Jinja2 templating engine.

It turns out you can generate formats other than HTML just as easily by writing your own template for a different format.

About

another BibTeX-to-HTML (with Jinja2 templates)

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 83.3%
  • HTML 16.7%