Skip to main content

ingest-kindle

Ingest Kindle books and highlights into the library pipeline. Parses My Clippings.txt, converts .epub/.mobi/.azw3 to text, and outputs to ~/clawd/library/books/ for downstream QRA extraction.

来源信息

仓库
grahama1970/agent-stack-public
最近来源活动
2026年9月24日 15:51
检测到的 SKILL.md 语言
英语
星标
0
分支
0

安装方式

默认使用会先检查来源的 Prompt;你也可以切换为直接命令,或下载本地副本。

检查来源文件

决定是否安装前,请先阅读 SKILL.md,以及 SkillsMP 当前展示的配套文件。

文件资源管理器
8 个文件

正在显示 SKILL.md

SKILL.md
来源说明 · 只读预览
name
ingest-kindle
description
Ingest Kindle books and highlights into the library pipeline. Parses My Clippings.txt, converts .epub/.mobi/.azw3 to text, and outputs to ~/clawd/library/books/ for downstream QRA extraction.
triggers
["ingest kindle","kindle highlights","my clippings","kindle book","import kindle","parse clippings"]
allowed-tools
["Bash","Read"]
metadata
{"clawdbot":{"emoji":"📖","requires":{"bins":"[Truncated]"}}}
provides
["ingest-kindle"]
composes
["memory","consume-book","doc2qra","task-monitor","agentic-evals"]
disciplines
["data-engineering"]
> STOP. READ THIS ENTIRE SKILL.MD BEFORE CALLING ANY ENDPOINT. # ingest-kindle **Ingest Kindle books and highlights into the library pipeline.** Parses My Clippings.txt for highlights/annotations, converts ebooks (.epub, .mobi, .azw3) to markdown text, and outputs to `~/clawd/library/books/<Title>/` for downstream processing with `/consume-book` and `/doc2qra`. ## Quick Start ```bash # Parse Kindle highlights ./run.sh clippings /media/kindle/documents/My\ Clippings.txt # Ingest a single ebook ./run.sh ingest book.epub --scope hasard_lee # Batch process a directory of Kindle exports ./run.sh ingest-all ~/kindle-exports/ # Check progress ./run.sh status # Verify dependencies ./run.sh health ``` ## Commands | Command | Description | |---------|-------------| | `clippings [path]` | Parse My Clippings.txt into structured highlights JSON | | `ingest <file>` | Process single .epub/.mobi/.azw3 to text.md | | `ingest-all [dir]` | Batch process Kindle export directory | | `status [--json]` | Show ingestion progress | | `health` | Verify dependencies (ebooklib, calibre) | ## Output Structure ``` ~/clawd/library/books/<Title>/ ├── text.md # Full extracted text ├── highlights.json # Structured highlights from My Clippings └── metadata.json # Author, title, ASIN, format ``` The `<!-- EXTRACTION_COMPLETE -->` marker in text.md signals downstream tools that extraction finished successfully (follows ingest-audiobook quality gate pattern). ## Pipeline Integration ``` Kindle Device/App │ ├── My Clippings.txt ──→ clippings ──→ highlights.json │ └── .epub/.mobi/.azw3 ──→ ingest ──→ text.md │ ┌─────────┴──────────┐ │ │ /consume-book /doc2qra (search, annotate) (QRA extraction) ``` ## Format Support | Format | Library | Notes | |--------|---------|-------| | `.epub` | ebooklib | Native Python, no external deps | | `.mobi` | calibre `ebook-convert` | Optional external dep | | `.azw3` | calibre `ebook-convert` | Optional external dep | | My Clippings.txt | Pure Python parser | Well-defined format | ## My Clippings.txt Format Kindle stores all highlights/notes in a single file with this structure: ``` Book Title (Author Name) - Your Highlight on page 42 | Location 612-615 | Added on Monday, January 15, 2024 12:30:00 AM The highlighted text goes here. ========== ``` The parser handles: - Highlights, notes, and bookmarks - Multiple books in one file - Unicode content - Various date formats ## Environment Variables | Variable | Default | Description | |----------|---------|-------------| | `KINDLE_LIBRARY_DIR` | `~/clawd/library/books` | Output directory | | `KINDLE_CLIPPINGS_PATH` | - | Default path to My Clippings.txt | ## Dependencies - `ebooklib` — EPUB parsing (pure Python) - `typer` — CLI framework - `rich` — Terminal output - `python-dotenv` — Environment loading - `calibre` ebook-convert CLI — Optional, for .mobi/.azw3 conversion
在 GitHub 查看