Skip to main content

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

Project description

github PyPI version DOI Conda Version 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

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.0}",
  version = {v0.3.0},
  doi = {10.5281/zenodo.3903987},
  url = {https://github.com/duetosymmetry/ads2inspire},
}

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ads2inspire-0.3.0.tar.gz (10.5 kB view details)

Uploaded Source

Built Distribution

ads2inspire-0.3.0-py2.py3-none-any.whl (9.2 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file ads2inspire-0.3.0.tar.gz.

File metadata

  • Download URL: ads2inspire-0.3.0.tar.gz
  • Upload date:
  • Size: 10.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.54.0 CPython/3.8.6

File hashes

Hashes for ads2inspire-0.3.0.tar.gz
Algorithm Hash digest
SHA256 60a44e917e50af5476fb55ee7589a9f74539359e6e9a0ff307473bfa6bdc3be7
MD5 5e7633f8deaf590fcac4fc29dfe4411d
BLAKE2b-256 dab7ad2aff3e25bafb8766ab6e7c10aec06b61bcd7eab8fb9aea6c583b395017

See more details on using hashes here.

File details

Details for the file ads2inspire-0.3.0-py2.py3-none-any.whl.

File metadata

  • Download URL: ads2inspire-0.3.0-py2.py3-none-any.whl
  • Upload date:
  • Size: 9.2 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.54.0 CPython/3.8.6

File hashes

Hashes for ads2inspire-0.3.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 c6169ce8ba4ae37bd4cb846496f79ec87099d202dd6fa78622f63c3b8c60c2d3
MD5 0ab2cf570d3809f0d43ab4eecfde575a
BLAKE2b-256 85f3d3a0efc14c092af324569e5d84b0f8144424be564249c554f4dc5a5b26a2

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page