chevron removed
This commit is contained in:
parent
8ee950940e
commit
3c3be6d79c
2 changed files with 11 additions and 4 deletions
|
|
@ -1,4 +1,5 @@
|
|||
from pathlib import Path
|
||||
from string import Template
|
||||
from typing import Annotated
|
||||
|
||||
from injectable import injectable, autowired, Autowired
|
||||
|
|
@ -13,4 +14,11 @@ class Mo:
|
|||
self._passwords = passwords
|
||||
|
||||
def process(self, mo_file: Path):
|
||||
pass
|
||||
raw = ''
|
||||
with open(mo_file, "r") as mo:
|
||||
raw = mo.read()
|
||||
tpl = Template(raw)
|
||||
rendered = tpl.substitute(self._passwords.get_values(tpl.get_identifiers()))
|
||||
de_mo_ified = str(mo_file).replace(".mo", "")
|
||||
with open(de_mo_ified, "w") as mo:
|
||||
mo.write(rendered)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue