Add configurable slides path and malformed marker detection

- project.json now supports "slides" field pointing to slides.json location
- Slide images are loaded from same directory as slides.json
- Validation detects malformed markers (missing ], extra spaces)
- Reports line numbers for each malformed marker

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-01-12 11:49:46 +01:00
parent b347841634
commit 7f7425da46
6 changed files with 65 additions and 20 deletions
+3 -3
View File
@@ -59,13 +59,13 @@ def build_ffmpeg_command(plan: RenderPlan, output_path: Path) -> list[str]:
bg_path = project_path / plan.config.background_video
cmd.extend(["-i", str(bg_path)])
# Input: slide images
slides_path = project_path / "media" / "slides"
# Input: slide images (from slides_dir, same directory as slides.json)
slides_dir = plan.slides_dir.resolve() if plan.slides_dir else project_path / "media" / "slides"
slide_inputs: list[str] = [] # Track which slides we've added
for event in plan.slide_events:
if event.slide_id not in slide_inputs:
image_path = slides_path / event.slide_def.image
image_path = slides_dir / event.slide_def.image
cmd.extend(["-i", str(image_path)])
slide_inputs.append(event.slide_id)