An AI-powered daily news summarization system based on Claude AI, supporting multi-domain classification (Politics, Finance, Entertainment, Health, Sports).
- 📰 Multi-source RSS News Collection - Automatically collects news from Reuters, Politico, WSJ, ESPN, and other major US media sources
- 🤖 AI-Powered Summarization - Uses Claude API to generate professional news summaries
- 📊 Multi-Domain Classification - Supports 5 built-in domains: Politics, Finance, Entertainment, Health, Sports
- 🔍 Custom Domains - Add custom news domains with AI-recommended RSS feeds
- ⏰ Time-based Filtering - Morning briefing (previous day 6 PM - today 6 AM), Evening briefing (today 6 AM - 6 PM), and Search news (last 6 hours)
- 📅 History Management - Automatically saves historical summaries with separate daily and search records
- 💾 Smart Caching - Caches daily briefings to avoid redundant API calls
- 📊 Progress Tracking - Real-time progress bar during summary generation
- 📄 Export Functionality - Export summaries as Markdown or PDF
- 🎨 Modern UI - Beautiful responsive design with mobile support
- ⚙️ Detail Level Control - Adjustable summary detail level (concise/standard/detailed)
- 🔄 Scheduled Tasks - Automatic daily briefings at 6:00 AM and 6:00 PM
pip install -r requirements.txtCreate a .env file:
# Windows
copy .env.example .env
# Linux/Mac
cp .env.example .envEdit the .env file and add your Anthropic API key:
ANTHROPIC_API_KEY=your_api_key_here
💡 Get API key: https://console.anthropic.com/
Windows:
python main.py
# Or double-click start.batLinux/Mac:
python main.py
# Or
chmod +x start.sh
./start.shOpen your browser and visit: http://localhost:8000
- Select Briefing Type: Morning Briefing (previous day 6 PM - today 6 AM), Evening Briefing (today 6 AM - 6 PM), or Search News (last 6 hours)
- Select Domain: Choose a specific domain or "All Domains"
- Adjust Detail Level: Select concise, standard, or detailed summary length
- Click "Generate Summary": The system will automatically collect news and generate AI summaries
- View History: Click "View History Daily Briefings" or "View Search Records" to browse previous summaries
- Export: Export summaries as Markdown or PDF files
- Custom Domains: Add custom news domains with AI-recommended RSS feeds
- Backend: FastAPI + Python 3.11+
- AI Model: Anthropic Claude 3 Haiku
- Frontend: HTML5 + CSS3 + Vanilla JavaScript
- Database: SQLite
- RSS Parsing: feedparser
- Content Processing: BeautifulSoup4
- Task Scheduling: APScheduler
- Export: markdown, reportlab
ai-newsketcher/
├── main.py # Backend main file (all logic)
├── index.html # Frontend page
├── requirements.txt # Python dependencies
├── .env # Environment variables (create this)
├── .env.example # Environment variable example
├── news_brief.db # SQLite database (auto-created)
└── README.md # This file
You can modify RSS feeds in the RSS_FEEDS dictionary in main.py:
RSS_FEEDS = {
"politics": ["https://feeds.reuters.com/reuters/politicsNews"],
"finance": ["https://feeds.reuters.com/reuters/businessNews"],
# ... more sources
}Default uses claude-3-haiku-20240307 (low cost, fast)
You can modify it in the summarize_news function in main.py:
model="claude-3-5-sonnet-20241022" # Higher quality but more expensiveYou can add custom news domains through the UI:
- Click "Custom Domain" button
- Enter domain name (e.g., "technology", "crypto")
- Click "Let AI Recommend Sources" to get AI-suggested RSS feeds
- Add the domain with selected feeds
- API Costs: Each summary generation calls Claude API, monitor your usage
- Network Requirements: Must be able to access RSS feeds and Anthropic API
- First Run: May take 30-60 seconds to generate summaries (depends on news quantity)
- Caching: Daily briefings are cached to avoid redundant API calls for the same day/type/domain
- Check if API key in
.envfile is correct - Verify network connection is normal
- Check if API quota is sufficient
- Some RSS feeds may require proxy access
- Check network connection
- Try replacing with other RSS feeds
- Confirm service is started (check terminal output)
- Confirm port 8000 is not occupied
- Try accessing http://127.0.0.1:8000
- ✅ Scheduled tasks for automatic daily briefings (APScheduler)
- ✅ Smart caching mechanism
- ✅ Progress tracking with real-time progress bar
- ✅ Export functionality (Markdown/PDF)
- ✅ Custom domain support with AI-recommended RSS feeds
- ✅ Detail level control (concise/standard/detailed)
- ✅ History management (daily briefings and search records)
- ✅ Delete functionality for history records
MIT License
- Anthropic - Claude AI
- RSS feed providers: Reuters, Politico, WSJ, ESPN, CBS Sports, Variety, STAT News, etc.