#!/usr/bin/env python3 """Assemble slide layout HTML and CSS from layout templates. Each layout type has paired .html and .css files in templates/layouts/. This script combines selected layouts into a single CSS output and lists available HTML templates. Usage: python3 assemble-layouts.py --list python3 assemble-layouts.py --layouts title,content,code python3 assemble-layouts.py --all --output layouts.css """ import argparse import sys from pathlib import Path SCRIPT_DIR = Path(__file__).resolve().parent LAYOUTS_DIR = SCRIPT_DIR.parent / "templates" / "layouts" LAYOUT_TYPES = { "title": { "description": "Title slide: 1 heading + 1 subtitle (max 12 words)", "density": "1 heading + 1 subtitle", }, "content": { "description": "Content slide: 4-6 bullets (each max 10 words, no nesting)", "density": "4-6 bullets, 10 words each", }, "grid": { "description": "Feature grid: max 6 cards (icon + label + descriptor)", "density": "6 cards max", }, "code": { "description": "Code slide: 8-10 lines, monospace, syntax highlight allowed", "density": "8-10 lines", }, "quote": { "description": "Quote slide: 1 quote (max 30 words) + attribution", "density": "1 quote + 1 attribution", }, "image": { "description": "Image slide: 1 image (max-height: min(50vh, 400px)) + caption (max 10 words)", "density": "1 image + caption", }, "section-break": { "description": "Section break: 1 word/phrase, full-bleed accent background", "density": "1 word or short phrase", }, } OVERFLOW_CHECKS = { "fixed-inner-height": { "detection": "grep -n 'height: [0-9]*px' output.html | grep -v 'max-height\\|min-height'", "fix": "Use max-height: min(Xvh, Ypx) instead of fixed px height", }, "min-height-on-slide": { "detection": "grep -n 'min-height' output.html | grep 'slide'", "fix": "Use exact height: 100vh; height: 100dvh (not min-height)", }, "nested-bullets": { "detection": "grep -n '
  • .*