cooklang_find/lib.rs
1//! # cooklang-find
2//!
3//! A library for finding, searching, and organizing Cooklang recipe files.
4//!
5//! This library provides utilities for working with .cook and .menu files,
6//! including:
7//! - Loading recipes from files or content
8//! - Searching recipes by name and content
9//! - Building hierarchical directory trees of recipes
10//! - Extracting and working with recipe metadata
11//!
12//! ## Quick Start
13//!
14//! ```no_run
15//! use cooklang_find::{get_recipe, search, build_tree};
16//! use camino::Utf8Path;
17//!
18//! // Load a specific recipe
19//! let recipe = get_recipe(vec!["./recipes"], "pancakes")?;
20//!
21//! // Search for recipes
22//! let results = search(Utf8Path::new("./recipes"), "chocolate")?;
23//!
24//! // Build a directory tree
25//! let tree = build_tree("./recipes")?;
26//! # Ok::<(), Box<dyn std::error::Error>>(())
27//! ```
28
29/// Recipe fetching utilities for loading recipes by name.
30pub mod fetcher;
31
32/// Core data models for recipes and metadata.
33pub mod model;
34
35/// Recipe searching functionality.
36pub mod search;
37
38/// Recipe tree building for directory hierarchies.
39pub mod tree;
40
41pub use fetcher::{get_recipe, get_recipe_str};
42pub use model::*;
43pub use search::search;
44pub use tree::{build_tree, RecipeTree};