ssg.templates module
- class ssg.templates.Builder(env_yaml, resolved_rules_dir, templates_dir, remediations_dir, checks_dir, platforms_dir, cpe_items_dir)[source]
Bases:
object
Class for building all templated content for a given product.
To generate content from templates, pass the env_yaml, path to the directory with resolved rule YAMLs, path to the directory that contains templates, path to the output directory for checks and a path to the output directory for remediations into the constructor. Then, call the method build() to perform a build.
- build()[source]
Builds all templated content for all languages, writing the output to the correct build directories.
- build_lang_for_templatable(templatable, lang)[source]
Builds templated content of a given Templatable for a selected language returning the filled template.
- build_platform(platform)[source]
Builds templated content of a given Platform (all CPEs/Symbols) for all available languages, writing the output to the correct build directories and updating the platform it self.
- build_rule(rule)[source]
Builds templated content of a given Rule for all available languages, writing the output to the correct build directories.
- get_lang_contents_for_templatable(templatable, language)[source]
For the specified Templatable, build and return only the specified language content.
- get_resolved_langs_to_generate(templatable)[source]
Given a specific Templatable instance, determine which languages are generated by the combination of the template supported_languages AND the Templatable’s template configuration ‘backends’.
- ssg.templates.TemplatingLang
alias of
templating_language_attributes