Metadata-Version: 2.1
Name: bbc
Version: 0.1.1
Summary: utility to check and format bibtex files
Home-page: https://github.com/tdsimao/bbc/
License: BSD-3
Author: tdsimao
Author-email: tdsimao@users.noreply.github.com
Requires-Python: >=3.6,<4.0
Classifier: License :: Other/Proprietary License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Requires-Dist: SPARQLWrapper (>=1.8.5,<2.0.0)
Requires-Dist: beautifulsoup4 (>=4.10.0,<5.0.0)
Requires-Dist: bibtexparser (>=1.2.0,<2.0.0)
Requires-Dist: isbnlib (>=3.10.9,<4.0.0)
Requires-Dist: pycountry (>=22.1.10,<23.0.0)
Requires-Dist: termcolor (>=1.1.0,<2.0.0)
Project-URL: Repository, https://github.com/tdsimao/bbc/
Description-Content-Type: text/markdown

# bbc

## Synopsis

`bbc` is a tiny utility that checks some basic properties of you bibtex files, orders the entries in an alphabetical order and style them in a uniform way.

## Usage

```bash
bbc <bib_file> --output=<out_file>
```

The formated bibtex is printed in the `<out_file>` file, while error messages on the standard error output.

Add the flag `--add-todo` to assign a `TODO` value to missing fields which are required for the particular types of entries:

```bash
bbc <bib_file> --output=<out_file> --add-todo
```

If you toggle option `--try-fix`, it will try to find missing ISSN and other informations about journals (from [DBpedia](http://wiki.dbpedia.org/)) or ISBN and other information for books (from [Google Books](books.google.com)).


## How to install

1. Clone this project.
2. Using `pipx` you can install the utility from the main folder:

```bash
pipx install .
```

## Prerequisities

This utility uses the following packages.

- [`bibtexparser`](https://github.com/sciunto-org/python-bibtexparser) to parse and print bibtex
- [`beautifulsoup4`](https://pypi.org/project/beautifulsoup4/) to scrape web pages
- [`libisbn`](https://github.com/xlcnd/isbnlib) to work ISBNs and Google Books
- [`SPARQLWrapper`](https://github.com/RDFLib/sparqlwrapper) to query DBpedia
- [`termcolor`](https://pypi.python.org/pypi/termcolor) to have colored error messages
- [`pycountry`](https://pypi.org/project/pycountry/) to query countries

## License

The software is distributed under the [BSD License](https://opensource.org/licenses/BSD-3-Clause).

## Acknowledgments

This project is based on [prettybib](https://github.com/jlibovicky/prettybib).

