From a34ecfd61f9e54fac707ab69ad7d9aa370a8113c Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Thu, 16 Apr 2026 14:10:07 +0000 Subject: [PATCH] Add playwright optional dependency and improve documentation - Add 'playwright' optional dependency group in pyproject.toml - Add Playwright browser capture to Features section in README - Add Playwright to system dependencies with install instructions - Fix missing blank line before VHS safety section in README The Playwright visual source feature (type: playwright) is fully implemented: - PlaywrightRunner class for browser capture via external scripts - CLI: docgen playwright --script ... --url ... --source ... - Compose integration dispatches type: playwright segments - Configuration: playwright section in docgen.yaml - Full test coverage Closes #16 Co-authored-by: John Menke --- README.md | 3 +++ pyproject.toml | 1 + 2 files changed, 4 insertions(+) diff --git a/README.md b/README.md index 13ff38f..22ed13a 100644 --- a/README.md +++ b/README.md @@ -10,6 +10,7 @@ https://jmjava.github.io/documentation-generator/ - **TTS narration** — generate MP3 audio from Markdown scripts via OpenAI gpt-4o-mini-tts - **Manim animations** — render programmatic animation scenes - **VHS terminal recordings** — render `.tape` files into MP4s +- **Playwright browser capture** — record browser-based demos as MP4 via headless Chromium - **ffmpeg composition** — combine audio + video into final segments - **Validation** — OCR error detection, layout analysis, audio-visual sync, narration linting - **GitHub Pages** — auto-generate `index.html`, deploy workflow, LFS rules, `.gitignore` @@ -132,6 +133,7 @@ Script contract: `DOCGEN_PLAYWRIGHT_WIDTH`, `DOCGEN_PLAYWRIGHT_HEIGHT`, and optional segment metadata - must write an MP4 to the requested output path - should use headless Playwright for CI compatibility + ### VHS safety: avoid real long-running commands in tapes VHS executes commands in a real shell session. For demos, prefer simulated output with `echo` @@ -175,6 +177,7 @@ docgen generate-all --retry-manim - **tesseract-ocr** — OCR validation - **VHS** — terminal recording (charmbracelet/vhs) - **Manim** — animation rendering (optional, install with `pip install docgen[manim]`) +- **Playwright** — browser capture (optional, install with `pip install docgen[playwright]` then `playwright install chromium`) ## Milestone spec diff --git a/pyproject.toml b/pyproject.toml index 9f772ca..8d89e41 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -24,6 +24,7 @@ dependencies = [ [project.optional-dependencies] manim = ["manim>=0.18"] +playwright = ["playwright>=1.40"] dev = [ "pytest>=7.0", "pytest-cov",