MCPcopy Index your code
hub / github.com/karpathy/reader3

github.com/karpathy/reader3 @main sqlite

repository ↗ · DeepWiki ↗
22 symbols 79 edges 2 files 13 documented · 59%
README

reader 3

reader3

A lightweight, self-hosted EPUB reader that lets you read through EPUB books one chapter at a time. This makes it very easy to copy paste the contents of a chapter to an LLM, to read along. Basically - get epub books (e.g. Project Gutenberg has many), open them up in this reader, copy paste text around to your favorite LLM, and read together and along.

This project was 90% vibe coded just to illustrate how one can very easily read books together with LLMs. I'm not going to support it in any way, it's provided here as is for other people's inspiration and I don't intend to improve it. Code is ephemeral now and libraries are over, ask your LLM to change it in whatever way you like.

Usage

The project uses uv. So for example, download Dracula EPUB3 to this directory as dracula.epub, then:

uv run reader3.py dracula.epub

This creates the directory dracula_data, which registers the book to your local library. We can then run the server:

uv run server.py

And visit localhost:8123 to see your current Library. You can easily add more books, or delete them from your library by deleting the folder. It's not supposed to be complicated or complex.

License

MIT

Core symbols most depended-on inside this repo

get_one
called by 5
reader3.py
get_list
called by 3
reader3.py
load_book_cached
called by 2
server.py
clean_html_content
called by 1
reader3.py
extract_plain_text
called by 1
reader3.py
parse_toc_recursive
called by 1
reader3.py
get_fallback_toc
called by 1
reader3.py
extract_metadata_robust
called by 1
reader3.py

Shape

Function 14
Class 4
Route 4

Languages

Python100%

Modules by API surface

reader3.py13 symbols
server.py9 symbols

Dependencies from manifests, versioned

beautifulsoup44.14.2 · 1×
ebooklib0.20 · 1×
fastapi0.121.2 · 1×
jinja23.1.6 · 1×
uvicorn0.38.0 · 1×

For agents

$ claude mcp add reader3 \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact