Skip to content

A weekly email digest from the selected economists RRS feeds

Notifications You must be signed in to change notification settings

DataFrosch/rss-digest

Repository files navigation

RSS Weekly Digest

A simple, stateless system to fetch RSS articles, generate AI-powered digests, and deliver them via email. No database, no complexity—just RSS feeds, an LLM, and your inbox.

Features

  • Stateless & Simple: No database, no state tracking, no complex setup
  • AI-Powered Digests: Uses any OpenAI-compatible LLM API (OpenAI, DeepSeek, OpenRouter, etc.)
  • Email Delivery: Clean HTML digests sent via Gmail SMTP (Google Workspace)
  • Flexible Scheduling: Run locally, via cron, or GitHub Actions
  • Cost-Effective: ~$0.007/month with Gemini Flash or DeepSeek (~1 cent!)
  • Easy to Customize: Simple config files for feeds and prompts

How It Works

RSS Feeds → Fetch Articles → LLM Analysis → Email Digest
  1. Fetch: Pull articles from configured RSS feeds (default: last 7 days)
  2. Analyze: Send all articles to LLM in a single API call to generate digest
  3. Send: Email the HTML digest via Gmail SMTP

Quick Start

  1. Clone the repo
   git clone git@github.com:DataFrosch/rss-digest.git
  1. Add your favorite RSS feeds in config/feeds.py.
  2. Set your LLM API key (DeepSeek, OpenAI, or OpenRouter).
  3. Tweak the prompt to match your interests.
  4. Set up GitHub Actions to automate your weekly digest.

Detailed setup

# 1. Install uv (Python package manager) if you don't have it
curl -LsSf https://astral.sh/uv/install.sh | sh

# 2. Clone and setup
git clone git@github.com:DataFrosch/rss-digest.git
cd rss-digest
uv sync

# 3. Configure environment
cp .env.example .env
# Edit .env with your API keys (see Setup section)

# 4. Run
uv run python src/main.py

1. Get API Keys

LLM Provider - Choose one:

Google Workspace / Gmail (Email):

2. Configure Environment

cp .env.example .env
# Edit .env with your keys - see .env.example for provider-specific examples

3. Customize Feeds (Optional)

Edit config/feeds.py to add your RSS feeds:

RSS_FEEDS = {
    "Tech News": "https://example.com/feed.xml",
    "Your Blog": "https://yourblog.com/rss",
}

You can also customize the LLM prompt in the same file.

Usage

# Full digest
uv run python src/main.py

# Options:
#   --test        Process only 5 articles
#   --dry-run     Generate but don't send email
#   --days N      Look back N days (default: 7)
#   --verbose     Detailed logging
#   --no-save     Don't save HTML file locally

Automation

GitHub Actions: Settings → Secrets → Add: OPENAI_API_KEY, OPENAI_BASE_URL (if needed), LLM_MODEL, SMTP_PASSWORD, FROM_EMAIL, RECIPIENT_EMAIL

Cron: 0 9 * * 1 cd /path/to/rss-digest && uv run python src/main.py

Customization

  • RSS Feeds: Edit config/feeds.py
  • LLM Prompt: Edit DIGEST_GENERATION_PROMPT in config/feeds.py
  • LLM Model: Change LLM_MODEL in .env (see .env.example for options)
  • Email Template: Edit templates/email_template.html

Project Structure

rss-digest/
├── src/
│   ├── main.py           # Main orchestration
│   ├── rss_fetcher.py    # RSS feed fetching
│   ├── llm_processor.py  # LLM digest generation
│   └── email_sender.py   # Email sending
├── config/
│   └── feeds.py          # Feed URLs & prompts
├── templates/
│   └── email_template.html
├── .github/workflows/
│   └── weekly_digest.yml # GitHub Actions
├── .env.example          # Environment template
└── pyproject.toml        # Dependencies

Cost Estimate

  • DeepSeek: ~$0.007/month (less than 1 cent!)
  • OpenRouter (Gemini): ~$0.007/month
  • OpenAI (GPT-4o-mini): ~$0.05/month
  • Gmail SMTP: Free (included with Google Workspace or personal Gmail)

Troubleshooting

  • No articles: Try --days 14 --verbose
  • Email fails: Verify Gmail App Password is correct, ensure 2FA is enabled, check digest.log
  • LLM errors: Verify API key, check OPENAI_BASE_URL, check credits

Contributing

Issues and PRs welcome!

License

MIT

About

A weekly email digest from the selected economists RRS feeds

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •