Better bibliography data
Project description
[!NOTE] See here for licensing information.
Bibliography files are notoriously hard to work with. Betterbib contains a number of easy-to-use command-line tools to help.
-
betterbib convertconverts between different bibliography formats, e.g. -
betterbib syncsyncs bibliography data with a number of online sources, e.g., -
betterbib formatformats your bibliography files to your liking. Can also (un)abbreviate author and journal names. -
betterbib doi-toconverts a DOI or DOI URL to a bibliography entry.
Installation
Install betterbib from PyPI with
pip install betterbib
Convert
Sync
Simply run
betterbib sync in.bib
to sync your bibliography file with online sources. For example, the input
@article{wiles,
title={Fermat Last Theorem},
doi={10.2307/2118559},
}
is converted to
@article{wiles,
number = {3},
doi = {10.2307/2118559},
pages = {443},
source = {Crossref},
volume = {141},
author = {Wiles, Andrew},
year = {1995},
month = may,
url = {https://doi.org/10.2307/2118559},
issn = {0003-486X},
journal = {The Annals of Mathematics},
publisher = {JSTOR},
title = {Modular Elliptic Curves and Fermat's Last Theorem},
}
See -h/--help for all options.
betterbib sync -h
Usage: betterbib sync [-h] [-i] [-c N] [-s SRC] [-m MINIMUM_SCORE] [-q] [--debug]
[--output-format {bibtex,biblatex,csl-json,ris}]
infiles [infiles ...]
Positional Arguments:
infiles input bibliography files
Options:
-h, --help show this help message and exit
-i, --in-place modify infile in place
-c, --num-concurrent-requests N
number of concurrent HTTPS requests (default: 1)
-s, --sources SRC sources to try (comma-separated, with order; default:
crossref,dblp,pubmed)
-m, --minimum-score MINIMUM_SCORE
minimum score to count as a match (default: 0.0)
-q, --quiet don't show progress info (default: show)
--debug some debug output (default: false)
--output-format {bibtex,biblatex,csl-json,ris}
force output format (default: same as input)
Format
After that, you can for example run
betterbib format in.bib --sort-fields --align-values --journal-names short --abbrev-first-names
to get
@article{wiles,
author = {Wiles, A.},
doi = {10.2307/2118559},
issn = {0003-486X},
journal = {Ann. Math.},
month = may,
number = {3},
pages = {443},
publisher = {JSTOR},
source = {Crossref},
title = {Modular Elliptic Curves and Fermat's Last Theorem},
url = {https://doi.org/10.2307/2118559},
volume = {141},
year = {1995},
}
betterbib format -h
Usage: betterbib format [-h] [-i] [--drop DROP] [--journal-names {long,short,unchanged}] [--abbrev-first-names]
[--sort-entries] [--sort-fields] [--doi-url-type {unchanged,old,new,short}]
[--page-range-separator PAGE_RANGE_SEPARATOR] [--protect-title-capitalization]
[--indent [INDENT]] [--align-values]
infiles [infiles ...]
Positional Arguments:
infiles input BibTeX files
Options:
-h, --help show this help message and exit
-i, --in-place modify infile in place
--drop DROP drop fields from entries (can be passed multiple times)
--journal-names {long,short,unchanged}
force full or abbreviated journal names (default: unchanged)
--abbrev-first-names abbreviate first names in author lists etc. (default: false)
--sort-entries sort entries alphabetically by BibTeX key (default: false)
--sort-fields sort fields alphabetically (default: false)
--doi-url-type {unchanged,old,new,short}
DOI URL (new: https://doi.org/<DOI>, short: https://doi.org/abcde) (default: new)
--page-range-separator PAGE_RANGE_SEPARATOR
page range separator (int or string, default: unchanged)
--protect-title-capitalization
brace-protect names in titles (e.g., {Newton}; default: false)
--indent [INDENT] indentation (int or string; default: 1)
--align-values align field values (default: false)
Dereference DOIs
Given a DOI or a DOI URL, it's often useful to generate a bibliography entry for it. betterbib doi-to does just that.
betterbib doi-to ris 10.1002/andp.19053221004
TY - JOUR
IS - 10
DO - 10.1002/andp.19053221004
SP - 891
EP - 921
DS - Crossref
VL - 322
AU - Einstein, A.
DA - 1905/01
UR - https://doi.org/10.1002/andp.19053221004
SN - 0003-3804
SN - 1521-3889
JF - Annalen der Physik
JO - Ann. Phys.
PB - Wiley
TI - Zur Elektrodynamik bewegter Körper
ER -
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 Distributions
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file betterbib-7.6.1-cp314-none-any.whl.
File metadata
- Download URL: betterbib-7.6.1-cp314-none-any.whl
- Upload date:
- Size: 3.1 MB
- Tags: CPython 3.14
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
38576abcef77e3341beb93db114a58b071cae46aabd322f97e031edc0be5faa7
|
|
| MD5 |
b33d92d86daa5af91c2f7bbedad00e58
|
|
| BLAKE2b-256 |
1c75e767867aff4d7705ba2f3fac24263875f9966aafe238d5e5dcba466a17fa
|
Provenance
The following attestation bundles were made for betterbib-7.6.1-cp314-none-any.whl:
Publisher:
release.yml on texworld/betterbib-dev
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
betterbib-7.6.1-cp314-none-any.whl -
Subject digest:
38576abcef77e3341beb93db114a58b071cae46aabd322f97e031edc0be5faa7 - Sigstore transparency entry: 652179992
- Sigstore integration time:
-
Permalink:
texworld/betterbib-dev@2b486ae34235d2147789f8251e186266f10b32a8 -
Branch / Tag:
refs/tags/v7.6.1 - Owner: https://github.com/texworld
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@2b486ae34235d2147789f8251e186266f10b32a8 -
Trigger Event:
release
-
Statement type:
File details
Details for the file betterbib-7.6.1-cp313-none-any.whl.
File metadata
- Download URL: betterbib-7.6.1-cp313-none-any.whl
- Upload date:
- Size: 3.1 MB
- Tags: CPython 3.13
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8996be73b1686dbc3b3bdf8d246c676744c5cad0675311c055e9e0740cb4b49f
|
|
| MD5 |
a59a46bae78da211ff2fa0538b000c32
|
|
| BLAKE2b-256 |
26566db292957a775fcd6a3c52038c51554eec18a73c433da46c6bb642f4293c
|
Provenance
The following attestation bundles were made for betterbib-7.6.1-cp313-none-any.whl:
Publisher:
release.yml on texworld/betterbib-dev
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
betterbib-7.6.1-cp313-none-any.whl -
Subject digest:
8996be73b1686dbc3b3bdf8d246c676744c5cad0675311c055e9e0740cb4b49f - Sigstore transparency entry: 652179989
- Sigstore integration time:
-
Permalink:
texworld/betterbib-dev@2b486ae34235d2147789f8251e186266f10b32a8 -
Branch / Tag:
refs/tags/v7.6.1 - Owner: https://github.com/texworld
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@2b486ae34235d2147789f8251e186266f10b32a8 -
Trigger Event:
release
-
Statement type:
File details
Details for the file betterbib-7.6.1-cp312-none-any.whl.
File metadata
- Download URL: betterbib-7.6.1-cp312-none-any.whl
- Upload date:
- Size: 3.0 MB
- Tags: CPython 3.12
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
15f7959126d70829f633f4db8af0ca20ce2cc6c0307c6f3940aa5ea2b83dc67c
|
|
| MD5 |
9abeba658bc0b31a25cb1d99e3ab22fa
|
|
| BLAKE2b-256 |
43d8e97c43806fb7ec17e1ab83d1277c2274e86ee83b95fb6758ff23fe369112
|
Provenance
The following attestation bundles were made for betterbib-7.6.1-cp312-none-any.whl:
Publisher:
release.yml on texworld/betterbib-dev
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
betterbib-7.6.1-cp312-none-any.whl -
Subject digest:
15f7959126d70829f633f4db8af0ca20ce2cc6c0307c6f3940aa5ea2b83dc67c - Sigstore transparency entry: 652179987
- Sigstore integration time:
-
Permalink:
texworld/betterbib-dev@2b486ae34235d2147789f8251e186266f10b32a8 -
Branch / Tag:
refs/tags/v7.6.1 - Owner: https://github.com/texworld
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@2b486ae34235d2147789f8251e186266f10b32a8 -
Trigger Event:
release
-
Statement type:
File details
Details for the file betterbib-7.6.1-cp311-none-any.whl.
File metadata
- Download URL: betterbib-7.6.1-cp311-none-any.whl
- Upload date:
- Size: 3.1 MB
- Tags: CPython 3.11
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c796cfd44036184f0b173e75a819456e0e60c9a85630148742ef34f8698c699e
|
|
| MD5 |
ecb3b068e8ee7149791b3789badd97af
|
|
| BLAKE2b-256 |
7108ce44a0717093398594b52a149a8455b8e6a2c1e48ba0af0103fc7a39a4fb
|
Provenance
The following attestation bundles were made for betterbib-7.6.1-cp311-none-any.whl:
Publisher:
release.yml on texworld/betterbib-dev
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
betterbib-7.6.1-cp311-none-any.whl -
Subject digest:
c796cfd44036184f0b173e75a819456e0e60c9a85630148742ef34f8698c699e - Sigstore transparency entry: 652179995
- Sigstore integration time:
-
Permalink:
texworld/betterbib-dev@2b486ae34235d2147789f8251e186266f10b32a8 -
Branch / Tag:
refs/tags/v7.6.1 - Owner: https://github.com/texworld
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@2b486ae34235d2147789f8251e186266f10b32a8 -
Trigger Event:
release
-
Statement type:
File details
Details for the file betterbib-7.6.1-cp310-none-any.whl.
File metadata
- Download URL: betterbib-7.6.1-cp310-none-any.whl
- Upload date:
- Size: 3.0 MB
- Tags: CPython 3.10
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6b5cac9990daa942da5fa40b2ed6b665ef5b075cb1352a0d7ff7bb62bf155eee
|
|
| MD5 |
d1fd76d8e475451410e4fdd61a096202
|
|
| BLAKE2b-256 |
8b04642411aaf51d9404d350cb225a0d7e17e8a7e77d4b47d9e980256936a14f
|
Provenance
The following attestation bundles were made for betterbib-7.6.1-cp310-none-any.whl:
Publisher:
release.yml on texworld/betterbib-dev
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
betterbib-7.6.1-cp310-none-any.whl -
Subject digest:
6b5cac9990daa942da5fa40b2ed6b665ef5b075cb1352a0d7ff7bb62bf155eee - Sigstore transparency entry: 652179998
- Sigstore integration time:
-
Permalink:
texworld/betterbib-dev@2b486ae34235d2147789f8251e186266f10b32a8 -
Branch / Tag:
refs/tags/v7.6.1 - Owner: https://github.com/texworld
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@2b486ae34235d2147789f8251e186266f10b32a8 -
Trigger Event:
release
-
Statement type: