Classes
Hydrator
Hydrates a Skeleton into a file structure.
Hydrator
Hydrates a Skeleton into a file structure.
Methods 1
apply
Apply the skeleton to the root path.
apply
def apply(self, skeleton: Skeleton) -> None
Apply the skeleton to the root path.
Parameters 1
skeleton |
Skeleton |
Internal Methods 4
__init__
__init__
def __init__(self, root_path: Path, dry_run: bool = False, force: bool = False)
Parameters 3
root_path |
Path |
|
dry_run |
bool |
|
force |
bool |
_process_components
Process a list of components recursively.
_process_components
def _process_components(self, components: list[Component], parent_path: Path, cascade: dict[str, Any]) -> None
Process a list of components recursively.
Parameters 3
components |
list[Component] |
|
parent_path |
Path |
|
cascade |
dict[str, Any] |
_generate_file_content
Generate the full markdown file content with frontmatter.
_generate_file_content
def _generate_file_content(self, comp: Component, effective_type: str | None, effective_variant: str | None) -> str
Generate the full markdown file content with frontmatter.
Parameters 3
comp |
Component |
|
effective_type |
str | None |
|
effective_variant |
str | None |
Returns
str
_write_file
Write file to disk (handling dry-run and force).
_write_file
def _write_file(self, path: Path, content: str) -> None
Write file to disk (handling dry-run and force).
Parameters 2
path |
Path |
|
content |
str |