<commit_before># pybib [![PyPI version](https://img.shields.io/pypi/v/pybib.svg?style=flat)](https://pypi.python.org/pypi?:action=display&name=pybib)

pybib is a super-easy way to get citations for your LaTeX document. Instead of typing out BibTeX entries yourself, just give pybib the Digital Object Identifier (DOI) of the resource you want to cite and it will get all the information for you. Then, you can just add the citation it gives you to your BibTeX file. Easy!

## Installation

The package is available on PyPi and can be installed with the following command:

```sh
$ pip3 install --user pybib
```

For user-only installs, pip installs scripts to the directory `~/.local/bin`, so make sure it's in your path. If you would prefer to install it system-wide, just leave out the `--user` flag.

## Usage examples

Get a citation:

```sh
$ bib 10.1112/plms/s2-42.1.230
```

Get a citation and add it to your bibliography file:

```sh
$ bib 10.1145/159544.159617 >> citations.bib
```

Get a citation and add it to your bibliography file, running it through `bibtool` first to format the entry and auto-generate a citation key:

```sh
$ bib 10.1145/159544.159617 | bibtool >> citations.bib
```

## Troubleshooting

If you encounter any problems, please open an issue so I can rectify them as soon as possible.<commit_msg>Update README for v2.0<commit_after># pybib [![PyPI version](https://img.shields.io/pypi/v/pybib.svg?style=flat)](https://pypi.python.org/pypi?:action=display&name=pybib)

pybib is a super-easy way to get citations for your LaTeX document. Instead of typing out BibTeX entries yourself, just give pybib the Digital Object Identifier (DOI) of the resource you want to cite and it will get all the information for you. Then, you can just add the citation it gives you to your BibTeX file. Easy!

## Installation

The package is available on PyPi and can be installed with the following command:

```sh
$ pip3 install --user pybib
```

For user-only installs, pip installs scripts to the directory `~/.local/bin`, so make sure it's in your path. If you would prefer to install it system-wide, just leave out the `--user` flag.

## Usage examples

### Retrieving citations

Get a citation:

```sh
$ bib get 10.1112/plms/s2-42.1.230
```

Get a citation and add it to your bibliography file:

```sh
$ bib get 10.1145/159544.159617 >> citations.bib
```

Get a citation and add it to your bibliography file, running it through `bibtool` first to format the entry and auto-generate a citation key:

```sh
$ bib get 10.1145/159544.159617 | bibtool >> citations.bib
```

### Searching

Search for a resource:

```sh
$ bib search name of the resource
```

Get the citation for search result number `N`:

```sh
$ bib search name of the resource --get N
```

## Troubleshooting

If you encounter any problems, please open an issue so I can rectify them as soon as possible.
{'fraction_non_alphanumeric': 0.09736659736659736, 'fraction_numerical': 0.035343035343035345, 'mean_word_length': 4.146167557932264, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 11, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '584821', 'n_tokens_mistral': 1017, 'n_tokens_neox': 865, 'n_words': 402}