1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
//! Template-to-file-tree generation system
//!
//! This module provides functionality for generating complete file trees from templates
//! with support for RDF annotations, variable substitution, and directory structure
//! creation. It enables generating entire project structures from declarative templates.
//!
//! ## Features
//!
//! - **File Tree Generation**: Generate complete directory structures from templates
//! - **RDF Annotations**: Template metadata stored in RDF format
//! - **Variable Substitution**: Dynamic path and content generation
//! - **Template Formats**: Support for multiple template formats (YAML, TOML, JSON)
//! - **Frozen Sections**: Preserve manual edits in generated files
//! - **Business Logic Separation**: Separate template structure from business logic
//! - **Tera Integration**: Full integration with Tera template engine
//!
//! ## Template Format
//!
//! Templates can be defined in YAML, TOML, or JSON format with support for:
//! - File and directory nodes
//! - Inline content or template file references
//! - Variable substitution in paths and content
//! - RDF metadata annotations
//! - Frozen section markers for manual edits
//!
//! ## Examples
//!
//! ### Generating a File Tree
//!
//! ```rust,no_run
//! use crate::templates::{generate_file_tree, TemplateContext, TemplateParser};
//!
//! # fn main() -> crate::utils::error::Result<()> {
//! let template = TemplateParser::parse_file("project.tree.yaml")?;
//! let mut ctx = TemplateContext::new();
//! ctx.set("project_name", "my-app")?;
//!
//! let result = generate_file_tree(template, ctx, "output")?;
//! println!("Generated {} files", result.files().len());
//! # Ok(())
//! # }
//! ```
//!
//! ### Using Template Parser
//!
//! ```rust,no_run
//! use crate::templates::TemplateParser;
//!
//! # fn main() -> crate::utils::error::Result<()> {
//! let template = TemplateParser::parse_file("project.tree.yaml")?;
//! println!("Parsed template: {}", template.format.name);
//! # Ok(())
//! # }
//! ```
pub use BusinessLogicSeparator;
pub use TemplateContext;
pub use ;
pub use ;
pub use ;
pub use ;