Convert bibtex entries of latex documents to DBLP references.

Bibtex entries for references in latex documents often stem from various different sources (scholar, conferencewebsites, …) and are of varying quality and slightly inconsistent (e.g., inconsistent conference names etc.). Incontrast, DBLP references are often very consistent and of high quality. Hence, this script looks up existing bibtexentries in DBLP and replaces those in the .bib file. Afterwards, the resulting .bib file can be used as a drop-inreplacement for the old one.

Replace references with cleaner bibtex references

Simply run the script.

python3     --original_bibtex path_to/original.bib    --target_bibtex path_to/clean_bib.bib

Optional: Integrate into document with existing bibtex files

Sometimes we might want to integrate a latex file (with clean bibtex entries) into another file (also with clean bibtexentries), e.g., the latex file could be a publication that we want to include in a cumulative dissertation withconsistent references.

The workflow in this example is as follows:

  1. We run the script on the latex file to obtain the clean_bib.bib file
  2. We integrate the new references (i.e., the delta of new publications) in the .bib file of the targetdocument (target.bib). To do this, we might use tools like Jabref, which you might anyway use for the largerdocument. Of course, the bibtex keys can change during this process. This is fixed by the next step.
  3. Now we run the script to adapt the citation keys of the smaller document to be consistent with thelarger one.
  4. The smaller document can now be included in the larger one.
python3     --original_bibtex path_to/clean_bib.bib    --original_latex path_to/original.tex    --target_bibtex path_to/target.bib    --target_latex path_to/target.tex

Dev setup


git clone [email protected]:bhilprecht/bib-sanitizer.git

Install requirements

python3 -m venv venv source venv/bin/activatepip3 install --upgrade setuptoolspip3 install --upgrade pippip3 install -e .


View Github