Skip to content

[codex] Integrate macOS Kindle capture and PDF workflow - #1

Draft
arunbababa wants to merge 2 commits into
masterfrom
develop-macos-app-silicon
Draft

[codex] Integrate macOS Kindle capture and PDF workflow#1
arunbababa wants to merge 2 commits into
masterfrom
develop-macos-app-silicon

Conversation

@arunbababa

Copy link
Copy Markdown
Owner

What changed

  • Detect and activate Amazon Kindle on macOS using its bundle ID and Quartz window metadata.
  • Capture only the Kindle window instead of the full desktop.
  • Run capture, PDF generation, output placement, and image cleanup as one workflow.
  • Write PDFs through a temporary file and replace the destination only after successful conversion.
  • Preserve captured images when conversion fails; remove them only after success.
  • Add --max-pages and --keep-images options for short validation runs and debugging.
  • Add unit tests and update macOS setup documentation.

Why

The previous macOS script used the Windows-oriented split workflow and attempted to activate an application named Kindle, while the installed app is Amazon Kindle.app with bundle ID com.amazon.Lassen. It also captured the entire desktop, allowing notifications and other windows to enter the PDF and trigger false page-change detection.

Validation

  • python -m py_compile kindle_to_img_mac.py pdf_converter.py test_workflow.py img_to_PDF.py
  • python -m unittest -v test_workflow.py (5 tests passed)
  • python -m pip check
  • Real Kindle smoke test: captured two distinct Kindle-window-only pages and generated a two-page PDF.
  • Real cleanup smoke test: generated a one-page PDF and verified that the temporary image directory was removed after success.

@coderabbitai

coderabbitai Bot commented Jun 14, 2026

Copy link
Copy Markdown

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: cc35d14f-2fd2-4190-bb29-0c221a7af48f

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch develop-macos-app-silicon

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

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.

1 participant