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.
The project uses uv. So for example, download Dracula EPUB3 to this directory as dracula.epub, then:
uv run reader3.py dracula.epubThis creates the directory dracula_data, which registers the book to your local library. We can then run the server:
uv run server.pyAnd 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.
When you select one or more words in the reader and click New Words, the app can now ask OpenAI for explanations and save them into the vocabulary list. Select a single word to save it individually, or select multiple words to save the entire phrase as one entry.
- Install the updated dependencies:
uv sync-
Create an API key at platform.openai.com/api-keys
-
Put your key into
.envin the project root:
OPENAI_API_KEY=your_api_key_here
READER3_TRANSLATION_TARGET_LANGUAGE=English
READER3_OPENAI_MODEL=gpt-5-mini- Start the server:
uv run server.pyThe app now auto-loads .env. If OPENAI_API_KEY is missing, it still works and saves the words, but skips the translation.
MIT
- How to enter the program? cd /Users/charliem/VSCode/github_projects/reader3 uv run server.py
then open http://127.0.0.1:8123
Delete all of the words in database: psql postgresql:///reader3 -c "TRUNCATE TABLE new_words RESTART IDENTITY;"
- retart: cd /Users/charliem/VSCode/github_projects/reader3 uv sync DATABASE_URL="postgresql:///reader3" uv run python server.py
github address https://github.com/Moksha36/reader3.git
