fmf_jinja.template¶
Module for the Template fmf data type.
- fmf_jinja.template.DEFAULT_JINJA_ENV = <jinja2.environment.Environment object>¶
Default settings for the jinja environment.
- class fmf_jinja.template.TemplateContext(tree_root, previous_ctx=None, recursive=True)¶
Bases:
objectGenerator’s run context.
-
jinja_env:
Environment¶ The base jinja environment.
-
previous_ctx:
TemplateContext|None¶ The context of the previous run.
- property tmp_path: Path¶
Temporary path where the current run’s output is placed.
- property output_path: Path¶
Output path of the current node being processed.
- property tree_path: Path¶
Path to the current tree node.
-
tree_root_path:
Path¶
- join_path(path, output_root=None)¶
Join a path to the current tree context.
If the path is absolute, it navigates from the tree root or output_root, otherwise it navigates from the current node’s path.
- Parameters:
path (
Path) – path object to joinoutput_root (
Path|None) – root path where to construct the path. Defaults to tree_root_path
- Return type:
Path- Returns:
joined path
-
jinja_env: