BibSane
Sanitize BibTeX files without going insane.
BibSane is comparable to bibexport and checkcites, but has a few important improvements.
Features:
- A single new cleaned bib file is written to replace the old ones.
- Unused entries are discarded.
- Missing entries result in an error.
- Duplicates are reported and merged if safe.
- Check for BibTeX keys that differ only by case.
- Remove redundant braces (not in author, editor and title)
- Optional configurable BibTeX database policies:
- Drop irrelevant entry types
- Remove cruft from BibTeX entries.
One may add a field, such as
bibsane = {misc.url}to support multiple policies for one BibTeX entry - Restrict the types of entries.
- Disallow
@preamble. - Strip newlines and redundant whitespace in fields.
- Normalize DOI (lowercase and strip proxy)
- Merge entries based on DOI and/or BibTeX ID.
- Normalize page double hyphen
- Abbreviated Journals, using abbreviso.
- Sort by year + author last name
- Hackable: written in Python and built on top of
bibtexparser. - Configurable
- Cheerful terminal output
- Usable as a
pre-commithook.
Installation as standalone tool
pip install BibSane
Usage
bibsane somefile.aux [-c someconfig.yaml]
The file [exampleconfig.yaml] can be used as a starting point for your configuration.
Usage as a pre-commit hook
Add the following to your .pre-commit-config.yaml
- repo: https://github.com/reproducible-reporting/bibsane
rev: v0.1.0
hooks:
- id: bibsane
# You may want to pass in a config file
args ["-c someconfig.yaml"]
You also need to commit the .aux files to your Git history.
Development
If you would like to contribute, please read CONTRIBUTING.md.
Metadata
Release files for BibSane 0.1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| BibSane-0.1.3.tar.gz | 48.6 kB | Without provenance | Details for BibSane-0.1.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| BibSane-0.1.3-py3-none-any.whl | Python 3 | none | any | Details for BibSane-0.1.3-py3-none-any.whl |
Total release size: 82.2 kB
Release files / BibSane-0.1.3.tar.gz
| Download URL | BibSane-0.1.3.tar.gz |
|---|---|
| Size | 48.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b6fbb1abe58670c4f3cd6ce4de696a09c12dbaa257e9ccc85e444884b601b358
|
|
BLAKE2b-256 checksum How to use checksums |
87ec5acfd6285c97540646c023ee051bce67fff963fcbc0ef9c7d74e204e374f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.11.4
|
Release files / BibSane-0.1.3-py3-none-any.whl
| Download URL | BibSane-0.1.3-py3-none-any.whl |
|---|---|
| Size | 33.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
530dc971c6f778761bc4bce25bcf2e0881e034a61e62908cf232f906076620b5
|
|
BLAKE2b-256 checksum How to use checksums |
d82243066269befddc3cec53c6335403227613487759ad97fb7f45c6307da9c5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.11.4
|
Security for BibSane 0.1.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.