citeformer.metadata

Metadata adapters — fetch CSL-JSON from DOIs, arXiv, PDFs, URLs.

Each adapter is a plain function that takes the identifier and returns either a CSL-JSON metadata dict (for DOI / arXiv) or a (metadata, content) tuple (for PDF / URL, where content is the paper text). The Source.from_* classmethods on citeformer.core.Source are thin wrappers around these.

Results are cached by default in ~/.cache/citeformer/metadata/ via diskcache. Pass use_cache=False to bypass. Override the location with the CITEFORMER_CACHE_DIR environment variable.

Submodules