Expand description
§cooklang-find
A library for finding, searching, and organizing Cooklang recipe files.
This library provides utilities for working with .cook and .menu files, including:
- Loading recipes from files or content
- Searching recipes by name and content
- Building hierarchical directory trees of recipes
- Extracting and working with recipe metadata
§Quick Start
use cooklang_find::{get_recipe, search, build_tree};
use camino::Utf8Path;
// Load a specific recipe
let recipe = get_recipe(vec!["./recipes"], "pancakes")?;
// Search for recipes
let results = search(Utf8Path::new("./recipes"), "chocolate")?;
// Build a directory tree
let tree = build_tree("./recipes")?;§UniFFI Support
This library includes UniFFI bindings for use on iOS and Android, behind the
ffi feature. It is enabled by default, so the mobile bindings build
unchanged; the ffi module provides simplified, FFI-safe types and functions.
Rust-only consumers should depend on this crate with default-features = false
to avoid compiling uniffi and its bindgen chain.
Re-exports§
pub use fetcher::get_recipe;pub use fetcher::get_recipe_str;pub use search::search;pub use tree::build_tree;pub use tree::RecipeTree;pub use model::*;
Modules§
- fetcher
- Recipe fetching utilities for loading recipes by name. Recipe fetching functionality.
- ffi
- UniFFI bindings for cross-platform support (iOS, Android). UniFFI bindings for cross-platform support (iOS, Android).
- menu
- Menu discovery by date (sections containing a date string). Menu discovery by date.
- model
- Core data models for recipes and metadata. Core data models for recipes and metadata.
- search
- Recipe searching functionality. Recipe searching functionality.
- tree
- Recipe tree building for directory hierarchies. Recipe tree building for directory hierarchies.