Expand description
A Rust library for generating reports from Cooklang recipes using Jinja2-style templates.
Templates are provided with multiple context variables:
scale: a float representing the recipe scaling factor (i.e. 1 by default)sections: the sections, containing steps and text, within the recipeingredients: the list of ingredients in the recipecookware: the list of cookware pieces in the recipemetadata: the dictionary of metadata from the recipe
For more details about each of these, look through the source for the models module.
Re-exports§
pub use error::Error;
Modules§
- config
- Configuration struct for report generation.
- error
- Error types for the cooklang-reports library.
- parser
- Global parser instance for efficient recipe parsing.
Functions§
- render_
template - Render a recipe with the deault configuration.
- render_
template_ with_ config - Render a recipe to a String with the provided
Config.