Skip to main content

BibTeX Tools

PyPI - Version Pytest GitHub License

This repository contains a collection of functions that might be helpful when working with BibTeX files (*.bib).

The main purpose is to clean up bib files such that match the format for the biblatex package.

Usage

Right now, the following functions are available

Use bibtex-tools --help to list the possible commands and bibtex-tools <command> --help to list the possible options for the sub-command <command>.

Modernizing Bib Files

The command bibtex-tools modernize allows to update the format of several fields in a bib-file. This includes replacing the deprecated month strings with the proper number entry, e.g., month=jan --> month={1}. There also is an option to download information from arXiv, if the eprint field is available.

Example

If you want to add all relevant information from arXiv (with existing eprint field) in your bib file literature.bib, you could use the following command

bibtex-tools modernize --arxiv literature.bib

Cleaning Bib Files

The command bibtex-tools clean allows to clean a bib-files. This includes replacing unicode characters by the LaTeX version. It is also possible to pass an additional file containing abbreviations, e.g., the IEEEabbr.bib file that is often used by authors publishing in IEEE journals.

Example

If you want to remove the fields abstract and isbn from your bib file literature.bib, you could use the following command

bibtex-tools clean -r abstract isbn literature.bib

Combining Bib Files

The command bibtex-tools combine allows combining multiple bib-files into a single one. By default, it automatically renames duplicate entry IDs that might occur after merging the files.

Example

If you want to combine the files 1.bib, 2.bib, and 3.bib into a single file called literature.bib, you can use the following command

bibtex-tools combine -o literature.bib 1.bib 2.bib 3.bib

Installation

You can install the package from PyPI using

pip3 install bibtextools

You can also install the (possibly unstable) development version from the Git repository using

git clone https://github.com/klb2/bibtex-tools
cd bibtex-tools
git checkout dev # if you want to checkout the development version
pip3 install . # you can use the -e option to track changes

Metadata

Release files for bibtextools 0.5.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 bibtextools 0.5.0
File Size Uploaded
bibtextools-0.5.0.tar.gz 52.9 kB Details

Built distribution (wheel)

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

Total release size: 91.2 kB

Release files / bibtextools-0.5.0.tar.gz

Download URL bibtextools-0.5.0.tar.gz
Size 52.9 kB
Tags Source
SHA-256 checksum
How to use checksums
933048961a58ec6e9bd18962e22dcc5bca26067cc8365405d04e5e1397ee8358
BLAKE2b-256 checksum
How to use checksums
8061e0cfecaef15f701c6b71f2f0cc682f6c37b8dd0e7af932918ec31feee547
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.12.7

Release files / bibtextools-0.5.0-py3-none-any.whl

Download URL bibtextools-0.5.0-py3-none-any.whl
Size 38.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a7eb19f60297b42c628ed84a97ad2062e4d9fb5e1cc43f5c8b9f1321b1625239
BLAKE2b-256 checksum
How to use checksums
eed7327174a5a947b46cda5025873dca205d60646e0f54b580bba05a94f322c3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.12.7

Release history Release notifications | RSS feed

This release

0.5.0 This release

2 release files

0.4.0

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.1

2 release files

0.1.0

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