Tools for working with BibTeX files
Project description
BibTeX Tools
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
- Modernizing bib files:
modernize
- Cleaning bib files:
clean
- Combining bib files:
combine
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for bibtextools-0.5.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a7eb19f60297b42c628ed84a97ad2062e4d9fb5e1cc43f5c8b9f1321b1625239 |
|
MD5 | b84deadabf2243b500778c97df6501ca |
|
BLAKE2b-256 | eed7327174a5a947b46cda5025873dca205d60646e0f54b580bba05a94f322c3 |