Skip to main content

Module format

Module format 

Source
Expand description

Recipe output formatters.

The recipe formatters live in cooklang_format, which is publishable on its own so other projects can render recipes without depending on this crate. They are re-exported here so that callers keep reaching them as cookcli_core::format::...

shopping_list stays here: it renders this crate’s AggregatedList, so moving it would point the dependency between the two crates the wrong way.

Modules§

cooklang
Format a recipe as cooklang
cooklang_source
Format a recipe as cooklang
human
Format a recipe for humans to read
latex
Format a recipe as a standalone LaTeX document.
markdown
Format a recipe as markdown
number
Human-friendly rendering of quantity numbers.
quantity
Deterministic ordering for GroupedQuantity.
schema
Format a recipe as schema.org/Recipe JSON-LD.
shopping_list
Shopping list output formatters.
typst
Format a recipe as a standalone Typst document.

Enums§

PaperSize
Page size for the latex and typst formatters.
Style
Whether formatters emit ANSI escape codes.

Functions§

human_to_string
Render a recipe the way cook recipe prints it, into a String.
markdown_to_string
Render a recipe as Markdown, into a String.