This commit is contained in:
Team3
2026-06-06 00:14:43 +02:00
parent 3ed5f7c3e5
commit a8fbf83059
39 changed files with 7347 additions and 472 deletions

16
backend/paths.py Normal file
View File

@@ -0,0 +1,16 @@
from pathlib import Path
from config import STORAGE_DIR, PROJECTS_DIR
def safe_basename(topic: str, format_name: str) -> str:
clean = topic.replace("/", "_").replace("\x00", "")
return f"{clean} - {format_name}"
def final_html_path(topic: str, format_name: str) -> Path:
return STORAGE_DIR / "html" / f"{safe_basename(topic, format_name)}.html"
def project_dir(name: str) -> Path:
return PROJECTS_DIR / name