reader3 README

The project's README from github.com/karpathy/reader3. As one markdown file: README.md.

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

reader3 (karpathy/reader3)

Searching Database…

3.9K ·GitHub
这是什么?这是 Andrej Karpathy 做的一个轻量级、可自行架设的 EPUB 阅读器,一次只显示书的一章,方便你把某一章粘贴给大语言模型,和它一起阅读。
那这是一个网站、桌面应用,还是给我的电子阅读器用的东西?它是你自己运行的:一个小型的自托管网页应用——在你的电脑上启动服务器,用浏览器打开 localhost:8123,它就会把你的书以书库的形式展示出来。
我怎么把第一本书导入进去?这个项目使用 uv:把一个 EPUB 文件下载到项目文件夹里(比如命名为 dracula.epub),运行 ingest 步骤来登记它——这会创建一个 draculadata 文件夹——然后启动服务器并打开 localhost:8123。
运行之前我需要装好哪些东西?只需要通过 uv 安装的 Python 工具——整个项目都是 Python 写的,通过 uv 运行,README 里没有提到其他前置要求。
这是一个成品、有官方支持的产品吗?不是。Karpathy 把它当作一个快速的示例来做的,90% 靠 vibe coding 写成,并表示不会提供支持或继续改进——它按现状提供,是为了启发别人的思路。
大语言模型那部分是怎么工作的——我需要 API 密钥吗?不需要。项目里没有内置任何大语言模型集成——你自己把某一章的文字复制粘贴给你喜欢的大语言模型,然后对照它的回复一起阅读。
我在哪里可以找到可以读的 EPUB 电子书?README 推荐了 Project Gutenberg,那里有很多免费的 EPUB 电子书;你放进项目目录的任何 EPUB 文件都可以用同样的方式导入。
我怎么往书库里添加或删除书?像导入第一本书那样再导入其他 EPUB 文件就行;每本书都有自己的文件夹(例如 draculadata),删掉那个文件夹就会把这本书从书库里移除。
Karpathy 为什么要做这个?作为一个快速的示例,展示和大语言模型一起读书有多容易——它 90% 靠 vibe coding 写成,目的是给人启发,而不是一个有支持的产品。
Creator
karpathy
Size
0.3 MB
Stars
3.9K
Updated
CommitNov 18
Age
10mo
Commits · 90 Days