citum-refs
Multi-format bibliography reference ingestion for the Citum citation engine: parsing
and loading external bibliography input into citum_schema::InputBibliography /
Reference, without depending on citum-engine. Output/serialization of native Citum
formats stays in citum-io.
Position in the dependency graph
Both citum-engine and citum-io depend on this crate. Surface crates
(citum-server, citum-bindings) may depend on it directly when they need reference
ingestion without pulling in the rendering engine.
Supported formats
| Format | Module | RefsFormat variant |
|---|---|---|
| Citum YAML/JSON/CBOR | formats::native |
CitumYaml, CitumJson, CitumCbor |
| CSL-JSON | formats::csl_json |
CslJson |
| BibLaTeX | formats::biblatex |
Biblatex |
| RIS | formats::ris |
Ris |
Each format module is self-contained: it owns both the I/O (reading/parsing a file or
string) and any entry/field mapping into Citum's reference types. BibLaTeX splits this
across two files — formats/biblatex/mod.rs (loading: load_biblatex,
parse_biblatex_str) and formats/biblatex/mapping.rs (entry/field →
InputReference conversion: input_reference_from_biblatex,
contributors_from_biblatex_persons, re-exported from mod.rs) — because the mapping
logic is large enough to warrant its own file.
Entry points
load_refs/load_refs_with_sets— load a single native or CSL-JSON bibliography file, with optional compound-set metadata.load_merged_refs— load and merge multiple bibliography files.load_input_refs— load bibliography input in an explicitly specifiedRefsFormat(native, CSL-JSON, BibLaTeX, or RIS).infer_refs_input_format/infer_refs_output_format— infer aRefsFormatfrom a file path (JSON inputs are content-sniffed to distinguish native Citum JSON from CSL-JSON).validate_compound_sets— validate compound reference sets against a loaded bibliography.