Skip to main content

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

Project description

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

bibcheck-0.1.0.tar.gz (8.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

bibcheck-0.1.0-py3-none-any.whl (8.8 kB view details)

Uploaded Python 3

File details

Details for the file bibcheck-0.1.0.tar.gz.

File metadata

  • Download URL: bibcheck-0.1.0.tar.gz
  • Upload date:
  • Size: 8.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.12

File hashes

Hashes for bibcheck-0.1.0.tar.gz
Algorithm Hash digest
SHA256 673431ebc773bf00ade1a4f7f5df9a86ebfdd8f4bde42538bca3d55fb69ecd40
MD5 33c745d14b6e1fbaf94f5802416952e7
BLAKE2b-256 f4b00aa119af386e692e7b165d11e4b81144d8ea3f853b7dc4a26e7de327bdd9

See more details on using hashes here.

File details

Details for the file bibcheck-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: bibcheck-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 8.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.12

File hashes

Hashes for bibcheck-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 675fc4482e8f7d49368e58090a33a3bdfb905ea05ee1ee856e718bda39b65227
MD5 39c4c6775886d13921f91c60aa0f1a26
BLAKE2b-256 c9d64ada45d782a3967e084a1aeca4e281fed486b46670d20775c1fd416cd4a1

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page