Book Capture

Capture books from Kindle, Apple Books, or PDF — then OCR and generate structured Markdown.
A Claude Code plugin that captures book pages as screenshots, extracts text via OCR, and generates thematically organized Markdown documents. Built for Obsidian knowledge vaults but works with any Markdown-based system.
What It Does
- Captures every page of a book as images (Mac Kindle, Apple Books, Kindle Cloud Reader, PDF, or photos of a paper copy)
- Extracts text via macOS Vision OCR + Claude Code agents for low-confidence pages
- Generates 8-14 thematically organized Markdown files with rich formatting (tables, blockquotes, cross-references)
- Creates a hub file with frontmatter and wikilinks to all topic files
The entire pipeline runs locally with no external API keys — OCR and content generation use Claude Code's built-in capabilities.
Supported Platforms
| Platform | How It Works | Best For |
|---|
| Mac Kindle | CGWindowList + screencapture + Page Down | Kindle purchases |
| Apple Books | CGWindowList + screencapture + arrow keys | Apple Books purchases |
| Kindle Cloud Reader | Playwright browser automation | When desktop app unavailable |
| PDF | Poppler pdftoppm conversion | Scanned/image-based PDFs |
| Photos | Ordered import of camera photos (HEIC/JPEG) | Physical books shot page by page |
Installation
Install from GitHub (recommended)
In Claude Code, run:
/plugins
- Navigate to the Marketplaces tab
- Select Add marketplace and enter:
masterleopold/book-capture
- Navigate to the Discover tab
- Find book-capture and install it
After installation, the commands are available in every Claude Code session.
| Scope | Effect |
|---|
| user (default) | Available in all your projects |
| project | Shared with your team via .claude/settings.json |
Try It (one-time)
git clone https://github.com/masterleopold/book-capture.git
claude --plugin-dir ./book-capture
First-Time Setup
After installing, run the setup script to install Node.js dependencies and compile the Vision OCR binary:
bash ~/.claude/plugins/cache/book-capture-marketplace/book-capture/*/scripts/setup.sh
Or the plugin will auto-detect and prompt you on first use.
Requirements
- macOS (required for screencapture and Vision OCR)
- Claude Code CLI installed and authenticated
- Node.js 20+
- Xcode Command Line Tools (
xcode-select --install)
- Accessibility permission for Terminal/Claude Code (System Settings > Privacy & Security > Accessibility)
- Poppler (PDF only):
brew install poppler
Commands
Source-Specific (recommended)
| Command | Platform | Description |
|---|
/book-capture:kindle | Mac Kindle | Capture from Amazon Kindle desktop app |
/book-capture:books | Apple Books | Capture from Apple Books app |
/book-capture:cloud | Kindle Cloud Reader | Capture via browser (Playwright) |
/book-capture:pdf | PDF file | Capture from scanned/image-based PDF |
/book-capture:photos | Photos | Import photos of a physical book's pages |
Pipeline Steps
| Command | Description |
|---|
/book-capture:capture | Full pipeline with platform selection prompt |
/book-capture:ocr | OCR only on existing page captures |
/book-capture:generate | Markdown generation from existing OCR text |
Page Images
Pages are stored as WebP (2000px, q85), not PNG. A retina screenshot is ~1.3MB of PNG; a large library of them runs to tens of GB. The same pages as WebP cost about a quarter of that, and OCR does not pay for it — on identical pages Vision scores the WebP the same or better, because downscaling smooths the screenshot's subpixel noise.
Books captured before this change still OCR: PNG and JPEG are read wherever pages are read. To convert an existing library, run scripts/compress-captures.mjs <captures-root> — it is idempotent, and moves originals aside rather than deleting them.
Quick Start
/book-capture:kindle B0883TQ3ZN
For a paper book you have photographed:
/book-capture:photos ~/Pictures/my-book-photos MyBookID