cookcli_core/format/mod.rs
1//! Recipe output formatters.
2//!
3//! The recipe formatters live in [`cooklang_format`], which is publishable on
4//! its own so other projects can render recipes without depending on this
5//! crate. They are re-exported here so that callers keep reaching them as
6//! `cookcli_core::format::..`.
7//!
8//! [`shopping_list`] stays here: it renders this crate's
9//! [`AggregatedList`](crate::shopping_list::AggregatedList), so moving it would
10//! point the dependency between the two crates the wrong way.
11
12pub mod shopping_list;
13
14// `cooklang_source as cooklang`: in this crate the formatter can keep the bare
15// name, but in `cooklang-format` it would collide with the re-exported
16// `cooklang` parser crate at that crate's root. The alias keeps
17// `format::cooklang::print_cooklang` working for `src/recipe/read.rs`; the
18// unaliased name is re-exported too, so a reader who found it under that name
19// in `cooklang-format`'s documentation can reach it here by the same spelling.
20pub use cooklang_format::{
21 cooklang_source, cooklang_source as cooklang, human, human_to_string, latex, markdown,
22 markdown_to_string, number, quantity, schema, typst, PaperSize, Style,
23};