#!/usr/bin/env python3 """ Re-clones the CV timeline deck (slides 8 → end) into views/pages/book/slides.php. python3 scripts/sync-book-slides.py [path/to/cv/views/pages/timeline.php] Only the slide markup, the slide titles and missing slide CSS are replaced; the book deck's own head, top bar, controls, zoom/fullscreen and narration code are kept. CV slide k (0-based) becomes book slide k - 7, so every index (i===N, go(N), titles[N]) and visible slide number is shifted. """ import re import sys from pathlib import Path FIRST = 7 # CV slide index that becomes book slide 0 ROOT = Path(__file__).resolve().parent.parent CV = Path(sys.argv[1] if len(sys.argv) > 1 else ROOT.parent / 'cv/views/pages/timeline.php') BOOK = ROOT / 'views/pages/book/slides.php' START = '