Skip to main content

BibCheck

A tool for checking and completing BibTeX files using DOI and arXiv entries.

Description

BibCheck is a Python tool that helps improve the quality of BibTeX files by fetching missing information from DOI and arXiv identifiers. It compares the existing entries with the fetched data and reports any discrepancies.

Features

  • Fetches BibTeX entries from DOI identifiers
  • Converts arXiv IDs to DOIs and fetches corresponding BibTeX entries
  • Compares existing entries with fetched data to identify discrepancies
  • Generates a corrected BibTeX file with the most complete information
  • Configurable field checking via JSON configuration files
  • Option to check only missing fields
  • Intelligent comparison that ignores trivial differences (like en-dash vs hyphen)
  • Special handling for page ranges (regex-based normalization)
  • Case-insensitive DOI comparison
  • Proper encoding handling to avoid display issues
  • Fixes for mojibake encoding issues in page ranges
  • Clear separation between entries in output
  • Immediate reporting of issues after checking each entry
  • Preserves original entries (only fixes mismatches and adds missing fields)
  • Note: Entry and field order may be changed due to bibtexparser limitations
  • Informs users when entries have no DOI or arXiv identifiers

Installation

pip install bibcheck

Or install from source:

git clone https://github.com/mailhexu/bibcheck.git
cd bibcheck
pip install .

Usage

# Basic usage
bibcheck your_bibliography.bib

# Print the default configuration template
bibcheck --print-config

# Use a custom configuration file
bibcheck -c config.json your_bibliography.bib

# Check only missing fields
bibcheck --missing-only your_bibliography.bib

This will generate a new file named your_bibliography_fixed.bib with the corrected entries.

Configuration

You can customize which fields are checked by creating a JSON configuration file:

# Print the default configuration template
bibcheck --print-config > config.json

Then edit the config.json file to enable or disable specific fields:

{
  "fields_to_check": {
    "title": true,
    "journal": true,
    "year": true,
    "volume": true,
    "number": true,
    "pages": true,
    "doi": true,
    "author": true
  },
  "check_missing_only": false
}

Requirements

  • Python 3.7+
  • bibtexparser >= 1.4.0
  • requests >= 2.25.0

License

This project is licensed under the MIT License - see the LICENSE file for details.

Metadata

Release files for bibcheck 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for bibcheck 0.1.0
File Size Uploaded
bibcheck-0.1.0.tar.gz 8.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for bibcheck 0.1.0
File Interpreter ABI Platform
bibcheck-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 17.4 kB

Release files / bibcheck-0.1.0.tar.gz

Download URL bibcheck-0.1.0.tar.gz
Size 8.6 kB
Tags Source
SHA-256 checksum
How to use checksums
673431ebc773bf00ade1a4f7f5df9a86ebfdd8f4bde42538bca3d55fb69ecd40
BLAKE2b-256 checksum
How to use checksums
f4b00aa119af386e692e7b165d11e4b81144d8ea3f853b7dc4a26e7de327bdd9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.10.12

Release files / bibcheck-0.1.0-py3-none-any.whl

Download URL bibcheck-0.1.0-py3-none-any.whl
Size 8.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
675fc4482e8f7d49368e58090a33a3bdfb905ea05ee1ee856e718bda39b65227
BLAKE2b-256 checksum
How to use checksums
c9d64ada45d782a3967e084a1aeca4e281fed486b46670d20775c1fd416cd4a1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.10.12

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page