Skip to main content

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

Project description

github PyPI version DOI 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 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] auxfile.aux [texfile1.tex [texfile2.tex [...]]]

If your main tex file is named wondeful.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.

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
  • Distribution of package for pip/conda
  • more?

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.1.1.tar.gz (9.0 kB view details)

Uploaded Source

Built Distribution

ads2inspire-0.1.1-py2.py3-none-any.whl (8.0 kB view details)

Uploaded Python 2 Python 3

File details

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

File metadata

  • Download URL: ads2inspire-0.1.1.tar.gz
  • Upload date:
  • Size: 9.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.1.1 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.8.3

File hashes

Hashes for ads2inspire-0.1.1.tar.gz
Algorithm Hash digest
SHA256 02b1c0737b57ae0298c54a6788126179decb050992922aa02dd8d0f00cec0eda
MD5 e25ff7e0cd987e8a1dd4d08ef1417c08
BLAKE2b-256 ec6bad0b033882d02ed2070a4229729bf8a99b8366e30ac4345810844ed77277

See more details on using hashes here.

File details

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

File metadata

  • Download URL: ads2inspire-0.1.1-py2.py3-none-any.whl
  • Upload date:
  • Size: 8.0 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.1.1 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.8.3

File hashes

Hashes for ads2inspire-0.1.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 2abb79443c4e8fb273385d9e10dbc24dc0c9da939872a80eee85c0d095bd0514
MD5 f0ba18cf70b4e380fe994cb6e13bcf6c
BLAKE2b-256 e57976f4d9878fc9b075f2a2066c0b4204a1597f8d75f7a537cebb8d3283e228

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