Expand description
Citation renderers for stored Metadata — BibTeX and CSL JSON 1.0.
Phase 2 / Slice 15b. The rendering logic originally lived in the
doiget-cli bib / csl subcommands; it is hoisted here so the
doiget-mcp doiget_bibtex_export / doiget_csl_export tools and
the CLI share a single implementation (docs/MCP_TOOLS.md §1 rows
doiget_bibtex_export / doiget_csl_export).
Both renderers are pure functions of a Metadata plus a citation
key (the entry’s safekey). No I/O, no network. They emit the Phase 1
binding fields from docs/STORE.md §2 (title, authors, year, doi,
venue, publisher, issn); richer entry-type / field mapping is a
Phase 2 follow-up.
Functions§
- to_
bibtex - Render a single BibTeX entry for
m, keyed bycitation_key. - to_
csl_ array - Render
mas a CSL JSON 1.0 array (a single-element array, so it is a drop-in for citeproc-js / pandoc--csl-jsonconsumers that expect a list of items), keyed bycitation_key.