Skip to main content

Extract BibTeX metadata from PDFs, EPUBs, URLs, and identifiers

Project description

antifile

Extract BibTeX metadata from PDFs, EPUBs, URLs, and identifiers (DOI, arXiv, ISBN) and append it to a .bib file.

Install

pip install antifile
# or
uv tool install antifile

Usage

antifile INPUT -o refs.bib

INPUT can be:

  • a PDF or EPUB file — antifile paper.pdf -o refs.bib
  • a folder of PDFs/EPUBs — antifile ~/Downloads/papers -o refs.bib (add --recursive to descend into subfolders)
  • a URLantifile https://example.com/article -o refs.bib
  • a DOIantifile 10.1145/3292500 -o refs.bib
  • an arXiv IDantifile arXiv:1706.03762 -o refs.bib
  • an ISBNantifile 9780262033848 -o refs.bib

Entries are appended with de-duplication: a new entry matching an existing one (by DOI, arXiv ID, ISBN, or normalized title+author) fills in any missing fields rather than creating a duplicate. Pass --no-merge to skip on duplicate, or --force to append anyway with an auto-suffixed key.

Options

flag effect
-o, --output FILE target .bib (required; created if missing)
--method {auto,doi,arxiv,isbn,crossref,llm,claude-code} force a PDF extraction method (default: auto)
--recursive recurse into subfolders for folder input
--no-preview skip the first-page PDF preview
--no-merge on duplicate, skip instead of filling missing fields
--force append even if a duplicate exists

LLM-assisted extraction

When a PDF has no resolvable identifier, antifile can fall back to an LLM to read the first page. Set whichever API key you have — it's picked up from the environment:

export ANTHROPIC_API_KEY=...   # or OPENAI_API_KEY, or GEMINI_API_KEY / GOOGLE_API_KEY

Related

  • antilibrary — manage BibTeX libraries from the terminal (can call antifile via --add-from-files).
  • antifind — online metadata search → BibTeX.

License

MIT

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

antifile-0.1.0.tar.gz (36.0 kB view details)

Uploaded Source

Built Distribution

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

antifile-0.1.0-py3-none-any.whl (25.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: antifile-0.1.0.tar.gz
  • Upload date:
  • Size: 36.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.8 {"installer":{"name":"uv","version":"0.11.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Arch Linux","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for antifile-0.1.0.tar.gz
Algorithm Hash digest
SHA256 39a5d7a2302eef4fb500e449127594236fe9b3e6e0c6bb69e4ca02a87ec22341
MD5 640e2ca5995d1e81371e095bc72c8701
BLAKE2b-256 8ddda838e782b8807320a17f66b5b06958304e5d80af38eda7887e239153d74b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: antifile-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 25.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.8 {"installer":{"name":"uv","version":"0.11.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Arch Linux","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for antifile-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5fe7dc40f25574b459174de39116f394feea775873524d8ced166aa52fbd2d9d
MD5 20ea143b8126be4422515ca8842bb18a
BLAKE2b-256 4691c036825b7c179fccd0fadc24647bd58ceebf8e35d04cfd8cd5e943a73c9b

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