BibClean¶
bibclean
is a simple auto-formater for BibTex file. It was designed to
clean .bib
files provided to sphinx documentation build using
sphinxcontrib-bibtex.
Install¶
BibClean is available on Pypi.
pip install bibclean
pip install git+https://github.com/mscheltienne/bibclean
Usage¶
BibClean can be used from 2 CLI entry-points: bibclean (to
auto-format) and bibclean-check (to check in CIs). Both entry-points
can be configured with the -c
or --config
flag which overwrite the
default TOML configuration with a different
TOML configuration, e.g.
pyproject.toml
.
bibclean
process a single file. See here for
additional information.
# clean the file references.bib in-place
bibclean references.bib
# clean the file references.bib and output in references-clean.bib
bibclean references.bib -o references-clean.bib
# clean the file references.bib in-place with the configuration in pyproject.toml
bibclean references.bib -c pyproject.toml
bibclean-check
exits with the exit-code 0
if the file is
already processed, with the exit-code 1
if violations have been
found and with the exit-code 2
if the configuration or the paths
are invalid. See here for additional
information.
# check if the file references.bib is already processed
bibclean-check references.bib
# check if the file references.bib is already processed with the configuration in pyproject.toml
bibclean-check references.bib -c pyproject.toml
License¶
BibClean is licensed under the MIT license. A full copy of the license can be found on GitHub.