Dev scripts

This commit is contained in:
krateng 2025-02-10 03:58:14 +01:00
parent ffed0c29b0
commit 767a6bca26
2 changed files with 7 additions and 4 deletions

3
dev/clear_testdata.sh Normal file
View File

@ -0,0 +1,3 @@
sudo rm -r ./testdata
mkdir ./testdata
chmod 777 ./testdata

View File

@ -7,15 +7,15 @@ import os
import jinja2
env = jinja2.Environment(
loader=jinja2.FileSystemLoader('dev/templates'),
loader=jinja2.FileSystemLoader('./templates'),
autoescape=jinja2.select_autoescape(['html', 'xml']),
keep_trailing_newline=True
)
with open("pyproject.toml") as filed:
with open("../pyproject.toml") as filed:
data = toml.load(filed)
templatedir = "./dev/templates"
templatedir = "./templates"
for root,dirs,files in os.walk(templatedir):
@ -27,7 +27,7 @@ for root,dirs,files in os.walk(templatedir):
if not f.endswith('.jinja'): continue
srcfile = os.path.join(root,f)
trgfile = os.path.join(reldirpath,f.replace(".jinja",""))
trgfile = os.path.join("..", reldirpath,f.replace(".jinja",""))
template = env.get_template(relfilepath)