Add Builder for shields

This commit is contained in:
Lucàs
2024-01-04 15:43:18 +01:00
parent efbf7fb7cc
commit b2c6d4c070
13 changed files with 466 additions and 441 deletions
+10 -4
View File
@@ -1,4 +1,10 @@
def load_template(template_file_path: str):
with open(template_file_path, 'r') as template_file:
template_content = template_file.read()
return template_content
class Template:
def __init__(self, template_path: str):
self.template_path = template_path
def render(self, **kwargs) -> str:
with open(self.template_path, 'r') as f:
template = f.read()
return template.format(**kwargs)