Metadata-Version: 2.1
Name: ads2inspire
Version: 0.3.1
Summary: Replace ADS citations with the appropriate INSPIRE ones in latex and bibtex
Home-page: https://github.com/duetosymmetry/ads2inspire
Author: Leo C. Stein
Author-email: leo.stein@gmail.com
License: MIT
Project-URL: Source, https://github.com/duetosymmetry/ads2inspire
Project-URL: Tracker, https://github.com/duetosymmetry/ads2inspire/issues
Keywords: latex bibtex bibliography
Platform: UNKNOWN
Classifier: Development Status :: 4 - Beta
Classifier: License :: OSI Approved :: MIT License
Classifier: Intended Audience :: Science/Research
Classifier: Topic :: Scientific/Engineering
Classifier: Topic :: Text Processing
Classifier: Topic :: Text Processing :: Markup
Classifier: Topic :: Text Processing :: Markup :: LaTeX
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Requires-Python: >=3.6
Description-Content-Type: text/markdown
Requires-Dist: bibtexparser
Requires-Dist: click (>=6.0)
Provides-Extra: complete
Requires-Dist: black ; extra == 'complete'
Requires-Dist: bumpversion ; extra == 'complete'
Requires-Dist: check-manifest ; extra == 'complete'
Requires-Dist: flake8 ; extra == 'complete'
Requires-Dist: pre-commit ; extra == 'complete'
Requires-Dist: pydocstyle ; extra == 'complete'
Requires-Dist: pytest ; extra == 'complete'
Requires-Dist: pytest-cov (>=2.5.1) ; extra == 'complete'
Requires-Dist: twine ; extra == 'complete'
Provides-Extra: develop
Requires-Dist: black ; extra == 'develop'
Requires-Dist: bumpversion ; extra == 'develop'
Requires-Dist: check-manifest ; extra == 'develop'
Requires-Dist: flake8 ; extra == 'develop'
Requires-Dist: pre-commit ; extra == 'develop'
Requires-Dist: pydocstyle ; extra == 'develop'
Requires-Dist: pytest ; extra == 'develop'
Requires-Dist: pytest-cov (>=2.5.1) ; extra == 'develop'
Requires-Dist: twine ; extra == 'develop'
Provides-Extra: test
Requires-Dist: pytest ; extra == 'test'
Requires-Dist: pytest-cov (>=2.5.1) ; extra == 'test'
Requires-Dist: pydocstyle ; extra == 'test'
Requires-Dist: check-manifest ; extra == 'test'
Requires-Dist: flake8 ; extra == 'test'
Requires-Dist: black ; extra == 'test'

[![github](https://img.shields.io/badge/GitHub-ads2inspire-blue.svg)](https://github.com/duetosymmetry/ads2inspire)
[![PyPI version](https://badge.fury.io/py/ads2inspire.svg)](https://badge.fury.io/py/ads2inspire)
[![DOI](https://zenodo.org/badge/273416634.svg)](https://zenodo.org/badge/latestdoi/273416634)
[![Conda Version](https://img.shields.io/conda/vn/conda-forge/ads2inspire.svg)](https://anaconda.org/conda-forge/ads2inspire)
[![license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/duetosymmetry/ads2inspire/blob/master/LICENSE)

# ads2inspire
Replace ADS citations with the appropriate INSPIRE ones in latex and bibtex

Why? Because ADS citation keys are not stable: they start out as something like `2019arXiv191207609s`,
and after being accepted to a journal turn into something like `2020PhRvD.101f4007S`. This means you
have to rewrite your latex, or you might even end up citing both entries!

## Installation

### From PyPI

In your Python environment run

```
python -m pip install ads2inspire
```

### From conda-forge

In your conda environment run

```
conda install -c conda-forge ads2inspire
```

### From this repository

In your Python environment from the top level of this repository run

```
python -m pip install .
```

### From GitHub

In your Python environment run

```
python -m pip install "git+https://github.com/duetosymmetry/ads2inspire.git#egg=ads2inspire"
```

## Usage
First latex/bibtex/latex your file, then run

```shell
ads2inspire [--backup] [--filter-type [ads|all]] [--fill-missing] auxfile.aux [texfile1.tex [texfile2.tex [...]]]
```

If your main tex file is named `wonderful.tex`, then your auxfile will be named `wonderful.aux`.
`ads2inspire` will read the aux file, query INSPIRE, then rewrite all the texfiles named on the
command line, and append to the first bibtex file named in auxfile.  The option `--backup` will
make the program write backups of the tex and bib files before rewriting them.  The option
`--filter-type` controls which keys to search for on INSPIRE: the default `"ads"` will only
search for keys that look like ADS keys, while `"all"` will try all keys (aside from those that
look like INSPIRE keys).
The `--fill-missing` flag will query for INSPIRE-like keys that were
referenced in the LaTeX source, but missing from the .bib file, and
fill them into the .bib file if found.

## Contributing

Note that I have done very little testing! Want to pitch in and help make this code better?
Please fork and send me PRs!

TODO:
- More testing
- More filter types
- more?

## Citation

The preferred BibTeX entry for citation of `ads2inspire` is

```
@software{ads2inspire,
  author = "{Stein, Leo C. and Feickert, Matthew}",
  title = "{ads2inspire: v0.3.1}",
  version = {v0.3.1},
  doi = {10.5281/zenodo.3903987},
  url = {https://github.com/duetosymmetry/ads2inspire},
}
```


