This version has not been extensively tested yet but works well with my database (above 500 entries) that have many different type of entries (with different origins).
Background (What - Why ?)
There are several tools that allow one to parse and convert from BibTeX to other formats. Among them, pybliographer has a nice GUI and worked well for me. However I wanted something that I can tweak to my exact needs and that could later use to get automatic publication lists in other formats.
So I preferred the conversion
BibTeX - XML - (Now HTML, more in the future)
Also I've found several good solutions for this kind of conversion. For instance, The BibTeX-XML-HTML Bibliography Project gives a ready-to-use solution, bibTeXML goes a similar path and has a bibtex2xml Python script. A modified version of it was used in the package Bibtex2HTML. I decided to use the version of the BibTeX to XML from this package, but when parsing my bibtex files, I've found some small problems. Being in python, they were quite easy to solve, but the script still focused in converting from BibTeX to XML and I wanted a little more. Namely, parsing the bibtex file and then converting. So I modified this script and the result is BibTeXparse.py. It makes a very little changes and adds a few features over the original scripts. (It also may have degraded the results in other aspects, but I've not seen it yet)
- Open Source software, License GPL (freely to use-modify-redistribute)
- This is Modularized version. With different routines for parsing and converting.
- Simple to use and modify for your needs
- Convert accents and some non-english characters to XML entities. Conversion is performed using a translation table so it should be very easy to add more symbols.
- Handles some (little) math, currently superscripts and subscripts. It should not be very difficult to add more.
- Add some filters to the original bibfile and it is very easy to put several others.
- You can import the module from your script and perform Python-powered manipulation on the bibtex data.
- Download the compressed archive with the latest release
- Uncompress the sources, you will get a directory with a
ready-to-use script the two source files:
There is also an example script:
example_script.pyand the example bib file with my bibliography list (
fiol.bib), the HTML output (
bib-fiol.html) and the style file (
- To recreate the HTML file just run
$> python example_script.py fiol.bib
- To get help type any of the following:
$> python example_script.py $> python example_script.py -h $> python example_script.py --help