Skip to content

feat: add PNG export format to render command#12

Merged
ludusrusso merged 5 commits into
mainfrom
claude/gifted-bartik
Mar 24, 2026
Merged

feat: add PNG export format to render command#12
ludusrusso merged 5 commits into
mainfrom
claude/gifted-bartik

Conversation

@ludusrusso

Copy link
Copy Markdown
Owner

Summary

  • Extract shared screenshot pipeline (captureSlides) and add RenderPNG function that exports slides as individual numbered PNG files
  • Add --format flag to render command (pdf default, png supported) with validation
  • Document PNG export in both README.md and llm.md

Closes #7, #8, #9, #10

Test plan

  • RenderPNG integration tests (output dir created, correct number of PNGs, valid image data)
  • RenderPNG with custom output directory
  • Invalid format flag returns clear error message
  • Full test suite passes (go test ./...)

🤖 Generated with Claude Code

@ludusrusso ludusrusso force-pushed the claude/gifted-bartik branch from 4ac2f67 to de9c830 Compare March 24, 2026 21:13
ludusrusso and others added 4 commits March 24, 2026 22:17
Extract the screenshot capture loop from RenderPDF into a shared
captureSlides helper, then add RenderPNG that writes individual
numbered PNG files to an output directory. Closes #8.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add --format flag (pdf|png) to `mkcr render` with validation.
Routes to RenderPDF or RenderPNG accordingly. Updates --output
help text to reflect dual semantics. Closes #9.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add PNG render examples, --format png usage, default output directory,
and output directory clearing behavior to both docs. Closes #10.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add skipIfNoChrome helper to skip render tests when no Chrome/Chromium
binary is found. Also support CHROMEDP_NO_SANDBOX env var to run Chrome
without sandboxing in CI environments, and set it in the CI workflow.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@ludusrusso ludusrusso force-pushed the claude/gifted-bartik branch from 83d2028 to af0ad8e Compare March 24, 2026 21:18
Replace exec.LookPath check with an actual chromedp launch attempt.
This correctly skips tests when Chrome exists but cannot start due
to sandbox restrictions or other environment issues.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@ludusrusso ludusrusso merged commit cf17e11 into main Mar 24, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add PNG export format to render command

1 participant