https://github.com/GeiserX/AskePub
This project is a Telegram bot assistant to help you prepare ePubs. It uses ChatGPT-4o to write contextual notes.
https://github.com/GeiserX/AskePub
ai annotation automation book chatgpt docker ebook epub gpt-4 hacktoberfest llm natural-language-processing nlp notes open-source openai python self-hosted telegram telegram-bot
Last synced: 2 months ago
JSON representation
This project is a Telegram bot assistant to help you prepare ePubs. It uses ChatGPT-4o to write contextual notes.
- Host: GitHub
- URL: https://github.com/GeiserX/AskePub
- Owner: GeiserX
- License: gpl-3.0
- Created: 2025-05-04T21:21:36.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2026-03-27T13:19:11.000Z (3 months ago)
- Last Synced: 2026-03-27T19:55:12.624Z (3 months ago)
- Topics: ai, annotation, automation, book, chatgpt, docker, ebook, epub, gpt-4, hacktoberfest, llm, natural-language-processing, nlp, notes, open-source, openai, python, self-hosted, telegram, telegram-bot
- Language: Python
- Size: 145 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Security: SECURITY.md
Awesome Lists containing this project
- awesome-gpt - AskePub - hosted Telegram bot that uses GPT-4o to generate AI study notes from ePub books. Open source, MIT, Python, Docker. (Chat bots / Other)
- awesome-telegram - AskePub - source bot that uses GPT-4o to generate AI study notes from ePub books. (Bots)
README


AskePub
Telegram bot assistant to help you prepare ePubs. Uses ChatGPT-4o to write contextual notes.
---
## Features
- Upload any `.epub` file via Telegram
- Select specific chapters or study the entire book
- Customize up to 10 study questions (or use smart defaults)
- Get three output formats:
- **Annotated ePub** with study notes injected into each chapter
- **Word document** (.docx) with all notes organized by chapter
- **PDF** with the same content
- Multi-language support (English, Spanish, Italian, French, German, Portuguese, Bulgarian)
- User access control via whitelist
- Rate limiting to manage API costs
- Admin notification and broadcast system
## Install
### Docker (recommended)
```sh
docker run --name askepub \
-e TOKEN=your-telegram-bot-token \
-e OPENAI_API_KEY=your-openai-key \
-e ADMIN_ID=your-telegram-user-id \
-e USER_IDS=id1,id2,id3 \
-v askepub-dbs:/app/dbs \
-v askepub-backups:/app/userBackups \
drumsergio/askepub:2.0.0
```
### Docker Compose
```sh
docker compose up -d
```
See [`docker-compose.yml`](docker-compose.yml) for the full configuration.
### Environment Variables
| Variable | Required | Description |
|---|---|---|
| `TOKEN` | Yes | Telegram bot token from @BotFather |
| `OPENAI_API_KEY` | Yes | OpenAI API key |
| `ADMIN_ID` | Yes | Telegram user ID of the bot admin |
| `TOKEN_NOTIFY` | No | Secondary bot token for admin notifications |
| `USER_IDS` | No | Comma-separated Telegram user IDs allowed to use the bot |
## Usage
1. Start a chat with your bot on Telegram
2. Send `/start`
3. Select your language
4. Upload an `.epub` file
5. Choose which chapters to study
6. Customize your study questions (or use defaults)
7. Wait for the AI to generate notes
8. Download your annotated ePub, DOCX, and PDF
### Commands
- `/start` - Start the bot and begin a study session
- `/change_language` - Change your interface language
- `/cancel` - Cancel the current operation
## Maintainers
[@GeiserX](https://github.com/GeiserX)
## Contributing
Feel free to dive in! [Open an issue](https://github.com/GeiserX/askepub/issues/new) or submit PRs.
AskePub follows the [Contributor Covenant](http://contributor-covenant.org/version/2/1/) Code of Conduct.
## Related Projects
**ePub Tools:**
- [ePubLangMerger](https://github.com/GeiserX/ePubLangMerger) — Merge two ePubs into a bilingual parallel reading book
- [epub-and-vtt-to-llm](https://github.com/GeiserX/epub-and-vtt-to-llm) — Fine-tune LLMs from ePub and subtitle data
**Telegram Bots:**
- [Telegram-Archive](https://github.com/GeiserX/Telegram-Archive) — Automated Telegram backup with local web viewer
- [paperless-telegram-bot](https://github.com/GeiserX/paperless-telegram-bot) — Manage Paperless-NGX documents through Telegram
- [telegram-delay-channel-cloner](https://github.com/GeiserX/telegram-delay-channel-cloner) — Relay messages between channels with delay
- [jellyfin-telegram-channel-sync](https://github.com/GeiserX/jellyfin-telegram-channel-sync) — Sync Jellyfin access with Telegram membership
- [telegram-slskd-local-bot](https://github.com/GeiserX/telegram-slskd-local-bot) — Automated music discovery and download via Telegram
## License
[MIT](LICENSE)