Skip to main content

Module parse

Module parse 

Source
Expand description

BibTeX / BibLaTeX → BibEntry intermediate records.

Tolerant of both dialects:

  • year = {2024} (BibTeX) and date = {2024-05} (BibLaTeX)
  • archivePrefix + eprint (arXiv v1 convention) and eprinttype = {arxiv} + eprint (BibLaTeX)
  • note = {...} / keywords = {...} / file = {...} (Zotero)

Field extraction is deliberately forgiving: a field that fails to parse (e.g., malformed date = {2024-may}) is dropped with its Err surfaced via [ParseWarning], not a hard error, so a single bad entry in a 5000-paper Zotero dump doesn’t sink the whole run.

Structs§

BibEntry
Intermediate record extracted from one .bib entry. Owns its data — no lifetimes tied to the source buffer.

Enums§

ParseError
Parse failure — surfaces upstream to scitadel bib import.

Functions§

normalize_doi
Normalize a DOI for matching. Lowercase + strip the two common URL/CURIE prefixes that .bib files carry.
parse_bibtex
Parse .bib source into a list of BibEntry. Empty source is legal (returns empty vec), matching Zotero’s export-nothing edge.