yaml_tools.templates module
Template bits for generating SSG-style controls in YAML.
- yaml_tools.templates.generate_control(context)[source]
Render an ID template string given a context dict.
- Parameters:
context (Dict)
- Return type:
Any
- yaml_tools.templates.xform_id(string, strip_trailing_zeros=False)[source]
Transform control ID strings, add leading zeros in forward direction:
AC-12(2) <==> ac-12.02
Caller should filter zero-length input or handle IndexError as needed.
- Parameters:
string (str)
strip_trailing_zeros (bool)
- Return type:
str