Impl: replace_template
This commit is contained in:
@@ -11,4 +11,16 @@ class Converter:
|
|||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def replace_template(params, main, captions, pins) -> str:
|
def replace_template(params, main, captions, pins) -> str:
|
||||||
return ""
|
template = open("res/template.js").read()
|
||||||
|
|
||||||
|
replacements = {
|
||||||
|
"{% params %}": params,
|
||||||
|
"{% main %}": main,
|
||||||
|
"{% captions %}": captions,
|
||||||
|
"{% pins %}": pins
|
||||||
|
}
|
||||||
|
|
||||||
|
for key in replacements:
|
||||||
|
template = template.replace(key, replacements[key])
|
||||||
|
|
||||||
|
return template
|
||||||
|
|||||||
Reference in New Issue
Block a user