Skip to content

Automated Medium content curation with AI scoring and email delivery

Notifications You must be signed in to change notification settings

willianpinho/medium-curator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Medium Curator

Automated curation of Medium articles based on your interests, with AI-powered scoring and email delivery.

Features

  • RSS-based fetching - No API keys needed for reading Medium
  • AI-powered scoring - Claude analyzes articles for relevance (optional)
  • Keyword matching - Fast, free filtering based on your interests
  • Email digests - Beautiful HTML emails delivered daily
  • Deduplication - Never see the same article twice
  • Cross-platform - Works on Windows, Mac, and Linux

Quick Start

1. Install Dependencies

cd ~/.claude/projects/medium-curator

# Create virtual environment (recommended)
python -m venv venv

# Activate (Windows)
venv\Scripts\activate

# Activate (Mac/Linux)
source venv/bin/activate

# Install dependencies
pip install -r requirements.txt

2. Configure Environment

# Copy example config
cp .env.example .env

# Edit with your settings
# At minimum, set EMAIL_RECIPIENT and one email provider

3. Test Run

# Dry run (no email)
python src/main.py --dry-run

# Full run with email
python src/main.py

4. Schedule Daily Runs

Windows (Task Scheduler):

# Run as Administrator
powershell -ExecutionPolicy Bypass -File scripts/setup_scheduler.ps1 -Time "08:00"

Mac/Linux (cron):

# Add to crontab
crontab -e

# Add this line (runs at 8 AM daily)
0 8 * * * /path/to/medium-curator/scripts/run_curator.sh

Configuration

interests.yaml

Edit config/interests.yaml to customize your interests:

categories:
  wealth_building:
    weight: 100  # Higher = more important
    keywords:
      - passive income
      - micro-saas
      - solopreneur
    negative_keywords:
      - crypto scam

scoring:
  min_score_threshold: 60  # Minimum score to include
  max_articles_per_digest: 20

Email Providers

Resend (Recommended)

  1. Sign up at resend.com
  2. Get API key from dashboard
  3. Set RESEND_API_KEY in .env

Gmail SMTP

  1. Enable 2FA on Google Account
  2. Create App Password at myaccount.google.com/apppasswords
  3. Set SMTP_* variables in .env

CLI Options

# Show help
python src/main.py --help

# Curate last 3 days
python src/main.py --days 3

# Send to specific email
python src/main.py --email other@email.com

# Skip email (just curate)
python src/main.py --no-email

# Dry run
python src/main.py --dry-run

AI Scoring (Optional)

For more accurate scoring, enable Claude AI:

  1. Get API key from console.anthropic.com
  2. Set ANTHROPIC_API_KEY in .env
  3. AI will analyze borderline articles (score 40-70)

Cost: ~$0.0007 per article (using claude-3-5-haiku)

File Structure

medium-curator/
├── config/
│   ├── interests.yaml     # Your interest configuration
│   └── email.yaml         # Email settings (optional)
├── data/
│   └── articles.db        # SQLite database
├── src/
│   ├── main.py            # CLI entry point
│   ├── curator.py         # Core curation logic
│   ├── ai_scorer.py       # AI scoring (optional)
│   └── email_sender.py    # Email delivery
├── scripts/
│   ├── run_curator.bat    # Windows runner
│   ├── run_curator.sh     # Unix runner
│   └── setup_scheduler.ps1 # Windows scheduler setup
├── requirements.txt
├── .env.example
└── README.md

Customization

Add New Interest Categories

Edit config/interests.yaml:

categories:
  my_new_category:
    weight: 85
    keywords:
      - keyword1
      - keyword2

Priority Authors/Publications

priority_authors:
  - favorite-author
  - another-author

priority_publications:
  - Towards Data Science
  - Better Programming

Email Template

Edit src/email_sender.py _render_html() method to customize the email appearance.

Troubleshooting

No articles found

  • Check if Medium RSS feeds are accessible
  • Lower min_score_threshold in interests.yaml
  • Increase --days parameter

Email not sending

  • Verify email provider credentials
  • Check spam folder
  • Test with --dry-run first to verify curation works

Rate limiting

  • Medium may rate limit RSS requests
  • Add delay between requests if needed

License

MIT - Use freely for personal automation.

About

Automated Medium content curation with AI scoring and email delivery

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published