A simple tool to help you clean up your BibTeX files and automatically find missing DOIs for your articles.
- Standardizes your bibliography entries.
- Deduplicates entries (merges duplicates, renames colliding IDs).
- Enriches your bibliography by automatically finding missing DOIs from CrossRef.
- Non-destructive: Creates a new file by default (e.g.,
myfile_fix.bib), keeping your original safe.
- Clone or Download this folder.
- Install dependencies. You need Python installed. Then run:
pip install -r requirements.txt
It's super easy to use!
-
Open your terminal.
-
Navigate to this folder.
-
Run the script on your bibliography file:
python fix_bib.py path/to/your/bibliography.bib
Example: If your file is named
articles.bib:python fix_bib.py articles.bib
To emit DOI verification details:
python fix_bib.py articles.bib --verify
-
The tool will think for a bit (finding DOIs takes a few seconds per article) and then create a new file named
articles_fix.bibin the same folder.
To keep only the entries cited in a LaTeX file, run:
python filter_bib.py path/to/your/bibliography.bib path/to/your/paper.texThis creates bibliography_cited.bib by default and drops entries not cited in the .tex.
We have included a sample file for you to test. Run:
python fix_bib.py example.bibIt should create example_fix.bib with the missing DOI for the Google search engine paper.
- It reads your
.bibfile. - It fixes common formatting issues.
- It searches for missing DOIs online.
- It saves a new clean file.
- Always check the output! Automations differ from humans.
- If the tool cannot find a DOI, it might be because the title is very generic or the service is temporarily unavailable.
- This tool respects your existing DOIs; if you already have one, it won't overwrite it.