Your AI-Powered Article Summarizer for Telegram
Scrape any web article, extract its content, and get AI-generated summaries in seconds!
| Feature | Description |
|---|---|
| π Smart Web Scraping | Extracts main content from any URL using advanced parsing |
| π§ Multi-LLM Support | Choose from Gemini, Groq, or OpenRouter models |
| π Customizable Prompts | Multiple summary styles: Technical, ELI5, Q&A, Social Media, and more |
| π Multi-Language Output | Configure summary output language via environment variable |
| π Web Search Integration | Enhance summaries with additional web context |
| π° Telegraph Publishing | Generate beautiful, readable Telegraph pages for long summaries |
| π API Quota Tracking | Monitor usage and prevent rate limit issues |
| π Password Protection | Secure bot access with optional authentication |
| π³ Docker Ready | Easy deployment with Docker and Docker Compose |
| π Linkwarden Integration | Save summarized articles directly to your Linkwarden instance |
| π‘οΈ FlareSolverr Support | Bypass Cloudflare protection for difficult sites |
- π Python 3.11+
- π³ Docker (optional, for containerized deployment)
- π API Keys:
- Telegram Bot Token
- Google Gemini API Key (and/or Groq/OpenRouter)
git clone https://github.com/Duccioo/TLDR-bot.git
cd TLDR-botcp .env.example .envEdit .env with your credentials:
# Required
TELEGRAM_BOT_TOKEN=your_telegram_bot_token
GEMINI_API_KEY=your_gemini_api_key
# Optional: Additional LLM Providers
GROQ_API_KEY=your_groq_api_key
OPENROUTER_API_KEY=your_openrouter_api_key
# Optional: Bot Settings
BOT_PASSWORD=your_secure_password
SUMMARY_LANGUAGE=English
# Optional: Linkwarden
LINKWARDEN_URL=https://linkwarden.yourdomain.com
LINKWARDEN_API_KEY=your_linkwarden_api_key
# Optional: Advanced
FLARESOLVERR_URL=http://localhost:8191/v1pip install -r requirements.txtpython src/bot.pydocker-compose up -d- π Start the bot β Open your Telegram bot and enter the password (if configured)
- π Send a URL β Paste any article link
- π Get your summary β Receive an instant AI-generated summary
- π° Expand to Telegraph β Click the button to generate a full Telegraph article
| Command | Description |
|---|---|
| π¨ Choose Prompt | Select summary style (Technical, ELI5, Q&A, etc.) |
| π Change Model | Switch between Gemini, Groq, or OpenRouter models |
| π Toggle Web Search | Enable/disable web context enrichment |
| π Check Quota | View your current API usage |
TLDR-bot/
βββ π src/ # Source code
β βββ π core/ # Core logic
β β βββ extractor.py # Content extraction
β β βββ scraper.py # Web scraping
β β βββ summarizer.py # LLM integration
β β βββ quota_manager.py # API quota tracking
β β βββ history_manager.py # User history
β β βββ user_manager.py # User management
β βββ π handlers/ # Telegram bot handlers
β β βββ auth_handlers.py # Authentication
β β βββ command_handlers.py
β β βββ message_handlers.py
β β βββ callback_handlers.py
β βββ π prompts/ # Summary prompt templates
β β βββ technical_summary.md
β β βββ eli5_summary.md
β β βββ social_media_post.md
β β βββ qna.md
β β βββ ...
β βββ bot.py # Main entry point
β βββ config.py # Configuration
β βββ keyboards.py # Telegram keyboards
βββ π data/ # Runtime data (quota, history)
βββ π docs/ # Documentation
β βββ ARCHITECTURE.md
β βββ CONFIGURATION.md
β βββ CONTRIBUTING.md
β βββ INSTALLATION.md
βββ π³ Dockerfile
βββ π³ docker-compose.yml
βββ π requirements.txt
βββ π LICENSE
| Provider | Models | Free Tier |
|---|---|---|
| Google Gemini | gemini-2.5-flash, gemini-2.0-flash | β Yes |
| Groq | Various open-source models | β Yes |
| OpenRouter | Multiple models (:free suffix) |
β Yes |
For more detailed information, check the /docs folder:
- π Architecture β System design and components
- βοΈ Configuration β All configuration options
- π οΈ Installation β Detailed setup guide
- π€ Contributing β How to contribute
Contributions are welcome! Please read our Contributing Guide for details on how to submit pull requests.
This project is licensed under the Apache License 2.0 β see the LICENSE file for details.
Made with β€οΈ for the open-source community
β Star this repo if you find it useful! β