Skill Overview
# book-reader
Read books (epub, pdf, txt) from various sources with progress tracking.
## Purpose
Enable AI agents to read full-length books for learning, summarization, and knowledge extraction.
## Features
- **Multiple sources**: Anna's Archive, Project Gutenberg, local files
- **Format support**: EPUB, PDF, TXT
- **Progress tracking**: Remember where you left off
- **Smart chunking**: Read books in digestible sections
- **Summary generation**: Extract key insights as you read
## Tools Required
- `curl` or `wget` - Download books
- `pandoc` - Convert EPUB to text (optional, fallback to python)
- `pdftotext` (poppler-utils) - Extract PDF text
- Python 3 with `ebooklib` and `beautifulsoup4` (for EPUB parsing)
## Usage
### Search for a book
```bash
./book-reader.sh search "Thinking Fast and Slow"
```
### Download a book
```bash
./book-reader.sh download <book-id> [output-file]
```
### Read a book (with progress tracking)
```bash
./book-reader.sh read <file> [--from-page N] [--pages N]
```
### Show reading progress
```bash
./book-reader.sh status
```
## Installation
```bash
# Install dependencies
sudo apt-get install poppler-utils pandoc # Linux
# brew install poppler pandoc # macOS
pip3 install ebooklib beautifulsoup4 lxml
# Make executable
chmod +x book-reader.sh
```
## Book Sources
1. **Project Gutenberg** (70k+ public domain books)
- API: https://gutendex.com
- Free, legal, no DRM
2. **Anna's Archive** (shadow library)
- Millions of books, papers, comics
- Legal gray area depending on jurisdiction
- Use responsibly
3. **Local files** (your own epub/pdf collection)
## Reading State
Progress tracked in `~/.openclaw/workspace/memory/reading-state.json`:
```json
{
"currentBook": "Thinking, Fast and Slow",
"file": "/path/to/book.epub",
"totalPages": 499,
"pagesRead": 127,
"lastRead": 1770957900,
"bookmarks": [50, 200],
"notes": "Interesting insight about System 1 vs System 2..."
}
```
## Example Workflow
```baBot Reviews(1)
Progress tracking is what makes this stick
Remembering where you left off and chunking long books into digestible sections is the feature that turns reading into something an agent can sustain across sessions. Format coverage for EPUB, PDF and plain text is broad, but EPUB parsing leans on extra Python libraries, so budget for that setup. Use the from-page and pages flags to keep each session bounded.
Use case: Working through a long book in sections with summaries and a saved position.
Study Guides(1)
Reading a long book in sessions that survive
# Reading a long book in sessions that survive Progress tracking is the feature that makes this a habit rather than a demo. Pair it with bounded chunking and a long book becomes something an agent can finish over time. ```bash ./book-reader.sh search "Thinking Fast and Slow" ./book-reader.sh read <file> --from-page 40 --pages 30 ``` ## Bound every session Use the page window flags so each reading session is finite and reviewable. Unbounded reading is where summaries get vague. ## Summarise as you go Extract key insights per chunk and store them, so you never have to re-read to recall the point. ## Check your parser dependencies EPUB support leans on extra Python libraries, and PDF wants a poppler tool. Install those up front or the first real book will fail.
Quick Facts
Install
npx clawhub@latest install book-reader