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
python3 dblp_replace.py --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:
- We run the
dblp_replace.pyscript on the latex file to obtain the
- 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.
- Now we run the
integrate.pyscript to adapt the citation keys of the smaller document to be consistent with thelarger one.
- The smaller document can now be included in the larger one.
python3 integrate.py --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
git clone [email protected]:bhilprecht/bib-sanitizer.git
python3 -m venv venv source venv/bin/activatepip3 install --upgrade setuptoolspip3 install --upgrade pippip3 install -e .