Skip to main content

Automatically fetch BibTeX entries from INSPIRE and ADS for LaTeX projects

Project description

easybib

Automatically fetch BibTeX entries from INSPIRE and NASA/ADS for LaTeX projects.

easybib scans your .tex files for citation keys, looks them up on INSPIRE and/or ADS, and writes a .bib file with the results. It handles INSPIRE texkeys (e.g. Author:2020abc) and ADS bibcodes (e.g. 2016PhRvL.116f1102A).

Installation

pip install easybib

Usage

easybib /path/to/latex/project

This will scan all .tex files in the directory, fetch BibTeX entries, and write them to references.bib.

Options

Flag Description
-o, --output Output BibTeX file (default: references.bib)
-s, --source Preferred source: ads (default), inspire, or auto
-a, --max-authors Truncate author lists (default: 3, use 0 for no limit)
-l, --list-keys List found citation keys and exit (no fetching)
--fresh Ignore existing output file and start from scratch

Examples

# Fetch from INSPIRE (no API key needed)
easybib ./paper -s inspire

# Use a custom output file
easybib ./paper -o paper.bib

# List citation keys without fetching
easybib ./paper -l

# Keep all authors
easybib ./paper -a 0

ADS API key

When using ADS as the source (the default), set your API key:

export ADS_API_KEY="your-key-here"

Get one from https://ui.adsabs.harvard.edu/user/settings/token.

How it works

  1. Scans .tex files for \cite{...}, \citep{...}, \citet{...}, and related commands
  2. Filters for keys containing : (INSPIRE/ADS format)
  3. Fetches BibTeX from the preferred source, with automatic fallback
  4. Replaces citation keys to match those used in your .tex files
  5. Truncates long author lists
  6. Skips keys already present in the output file (use --fresh to override)

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

easybib-0.1.0.tar.gz (7.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

easybib-0.1.0-py3-none-any.whl (7.5 kB view details)

Uploaded Python 3

File details

Details for the file easybib-0.1.0.tar.gz.

File metadata

  • Download URL: easybib-0.1.0.tar.gz
  • Upload date:
  • Size: 7.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.2

File hashes

Hashes for easybib-0.1.0.tar.gz
Algorithm Hash digest
SHA256 246fd266f7f850c139cf88159bd8c7ed4b3f2df0a3802282806c64c29948f55b
MD5 3b5db01b6c46074ce73cc94a04bcfbd6
BLAKE2b-256 c5c8707f1c2b1d1670ac4d4db8c5373e407beb4fc168752cc7546c6c25fc3c40

See more details on using hashes here.

File details

Details for the file easybib-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: easybib-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 7.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.2

File hashes

Hashes for easybib-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0a59fa51baee04c25b1f90dcffba61a6769277e2d5123227f8a9457e4391c2bc
MD5 4d0560a7a2bc84afda35c81458fe82ce
BLAKE2b-256 fef65f834c403e3b6d87189300be47463f0887a1601d64423d64d7fd1b9a53f1

See more details on using hashes here.

Supported by

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