input validierung für Qualifikationsfeld. Wenn keine Daten -> Platzhalter im template löschen

This commit is contained in:
Rob committed 2026-06-23 11:49:54 +02:00
1 parent ef219e00ba
commit e50f423304
2 files changed
+56 -1

No files matched your search

+13 -1
View File
@@ -22,7 +22,7 @@ from src.config import (
get_available_templates,
)
from src.parser import parse_input_file, group_by_employee, get_unique_employees
from src.validator import validate_template
from src.validator import validate_input_file, validate_template
from src.writer import generate_activity_reports
@@ -70,6 +70,18 @@ def main():
total = tpl_result.info.get("total_fields", "?")
print(f"[OK] {found}/{total} Platzhalter im Template gefunden.")
# ── Input validieren ──────────────────────────────────────────────
print()
print("[INFO] Validiere Input-Datei…")
inp_result = validate_input_file(input_path, config.input_schema, config.month_sheet_pattern)
if not inp_result.is_valid:
for err in inp_result.errors:
print(f"[FEHLER] {err}")
return 1
if inp_result.warnings:
for warn in inp_result.warnings:
print(f"[WARN] {warn}")
# ── Input parsen ──────────────────────────────────────────────────
print()
print("[INFO] Parse Input-Datei…")