Transition to monorepo on a new Dev branch

This commit is contained in:
2023-02-22 10:29:46 +01:00
parent 8436f03ec7
commit 3a483dc0ef
3712 changed files with 751 additions and 11 deletions

View File

@ -0,0 +1,21 @@
#!/usr/bin/env python3
import os
import shutil
from pathlib import Path
def Main():
for Theme in os.listdir("Sources/Themes"):
Path(f"Build/Themes/{Theme}").mkdir(parents=True, exist_ok=True)
try:
shutil.copyfile(f"Sources/Themes/{Theme}/Style.css", f"Build/Themes/{Theme}/Style.css")
except FileExistsError:
pass
with open(f"Sources/Snippets/Base.html", "r") as f:
Base = f.read()
with open(f"Sources/Themes/{Theme}/Body.html", "r") as f:
Body = f.read()
with open(f"Build/Themes/{Theme}/{Theme}.html", "w+") as f:
f.write(Base.replace("{{Body}}", Body))
if __name__ == "__main__":
Main()