Metadata-Version: 2.4
Name: kindle-pdf-capture
Version: 1.4.3
Summary: Capture Kindle for Mac pages via screen recording and build a high-quality PDF (with optional OCR).
Project-URL: Homepage, https://github.com/toshtag/kindle-pdf-capture
Project-URL: Issues, https://github.com/toshtag/kindle-pdf-capture/issues
Project-URL: Documentation, https://github.com/toshtag/kindle-pdf-capture#readme
Author: Pocket (@toshtag)
License: MIT License
        
        Copyright (c) 2026 Pocket (@toshtag)
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
License-File: LICENSE
Keywords: capture,kindle,macos,ocr,pdf,screenshot
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: Console
Classifier: Intended Audience :: End Users/Desktop
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: MacOS :: MacOS X
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Multimedia :: Graphics :: Capture :: Screen Capture
Classifier: Topic :: Utilities
Requires-Python: >=3.11
Requires-Dist: click>=8.1.7
Requires-Dist: img2pdf>=0.5.1
Requires-Dist: numpy>=2.0
Requires-Dist: opencv-python>=4.10
Requires-Dist: pikepdf>=10.5.1
Requires-Dist: pillow>=12.2.0
Requires-Dist: pyobjc-framework-quartz>=11.0; sys_platform == 'darwin'
Requires-Dist: rich>=15.0.0
Provides-Extra: dev
Requires-Dist: pytest-cov>=7.1.0; extra == 'dev'
Requires-Dist: pytest-mock>=3.15.1; extra == 'dev'
Requires-Dist: pytest>=8.3; extra == 'dev'
Requires-Dist: ruff>=0.8; extra == 'dev'
Provides-Extra: ocr
Requires-Dist: ocrmypdf>=16.0; extra == 'ocr'
Description-Content-Type: text/markdown

# kindle-pdf-capture

Capture Kindle for Mac pages via screen recording and build a high-quality PDF (with optional OCR).

> 📚 Languages:
> [English](https://github.com/toshtag/kindle-pdf-capture/tree/main/docs/en) ·
> [日本語](https://github.com/toshtag/kindle-pdf-capture/tree/main/docs/ja)

## Features

- Automatic content-region detection (strips window chrome, title bar, and Kindle header)
- Background capture via Quartz — no need to keep Kindle in the foreground
- Smart page-turn detection (frame-diff polling, no fixed sleep)
- LTR and RTL (manga) support via `--direction`
- Book-like PDF page sizing (300 DPI default)
- Optional OCR text layer via Tesseract (for non-macOS viewers; macOS Live Text works without it)
- End-of-book auto-detection (duplicate-frame streak)
- Manual cover-region selection via `--manual-crop` (drag-to-select UI for books with all-white covers)

## Quick start

```bash
# Install
uv tool install kindle-pdf-capture

# Capture a book (open Kindle to the first page first)
kpc --out output/my-book

# Capture a right-to-left book (manga)
kpc --out output/my-manga --direction left

# Capture a book with an all-white cover (manual region selection)
kpc --out output/my-book --manual-crop

# See all options
kpc --help
```

### With OCR

OCR needs Tesseract and Ghostscript as system dependencies, plus the `[ocr]` extra:

```bash
brew install tesseract tesseract-lang ghostscript
uv tool install "kindle-pdf-capture[ocr]"

kpc --out output/my-book --ocr
```

Working on the project itself? The
[installation guide](https://github.com/toshtag/kindle-pdf-capture/blob/main/docs/en/installation.md)
covers installing from source.

## Documentation

- [Installation](https://github.com/toshtag/kindle-pdf-capture/blob/main/docs/en/installation.md) · [インストール](https://github.com/toshtag/kindle-pdf-capture/blob/main/docs/ja/installation.md)
- [Usage](https://github.com/toshtag/kindle-pdf-capture/blob/main/docs/en/usage.md) · [使い方](https://github.com/toshtag/kindle-pdf-capture/blob/main/docs/ja/usage.md)
- [macOS permissions](https://github.com/toshtag/kindle-pdf-capture/blob/main/docs/en/permissions.md) · [macOS 権限](https://github.com/toshtag/kindle-pdf-capture/blob/main/docs/ja/permissions.md)
- [Architecture](https://github.com/toshtag/kindle-pdf-capture/blob/main/docs/en/architecture.md) · [アーキテクチャ](https://github.com/toshtag/kindle-pdf-capture/blob/main/docs/ja/architecture.md)
- [Troubleshooting](https://github.com/toshtag/kindle-pdf-capture/blob/main/docs/en/troubleshooting.md) · [トラブルシューティング](https://github.com/toshtag/kindle-pdf-capture/blob/main/docs/ja/troubleshooting.md)
- [Legal](https://github.com/toshtag/kindle-pdf-capture/blob/main/docs/en/legal.md) · [法的事項](https://github.com/toshtag/kindle-pdf-capture/blob/main/docs/ja/legal.md)

## License

MIT — see [LICENSE](https://github.com/toshtag/kindle-pdf-capture/blob/main/LICENSE).
