Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,8 @@ wheels/
.venv

# Custom
.data/
*_data/
*.epub
!alice.epub

23 changes: 19 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,36 @@ A lightweight, self-hosted EPUB reader that lets you read through EPUB books one

This project was 90% vibe coded just to illustrate how one can very easily [read books together with LLMs](https://x.com/karpathy/status/1990577951671509438). 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
## Simple Usage

The project uses [uv](https://docs.astral.sh/uv/). So for example, download [Dracula EPUB3](https://www.gutenberg.org/ebooks/345) to this directory as `dracula.epub`, then:
The easiest way to use the reader:

```bash
uv run book.py alice.epub
```

This will:
1. Process the EPUB file and extract all content, images, and metadata
2. Start the server automatically
3. Open the book at [localhost:8123](http://localhost:8123/)

You can run it again with a different book, and the previous one will be replaced. Press `Ctrl+C` to stop the server.

## Advanced Usage

The project uses [uv](https://docs.astral.sh/uv/). For manual control over processing and serving:

```bash
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:
This creates the directory `dracula_data` with the processed book. Then run the server separately:

```bash
uv run server.py
```

And visit [localhost:8123](http://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.
And visit [localhost:8123](http://localhost:8123/). You can easily add more books, or delete them from your library by deleting the `*_data` folder. It's not supposed to be complicated or complex.

## License

Expand Down
Binary file added alice.epub
Binary file not shown.
Loading