feat: add PNG export format to render command#12
Merged
Conversation
4ac2f67 to
de9c830
Compare
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>
83d2028 to
af0ad8e
Compare
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
captureSlides) and addRenderPNGfunction that exports slides as individual numbered PNG files--formatflag torendercommand (pdfdefault,pngsupported) with validationCloses #7, #8, #9, #10
Test plan
RenderPNGintegration tests (output dir created, correct number of PNGs, valid image data)RenderPNGwith custom output directorygo test ./...)🤖 Generated with Claude Code