Skip to content

rdyson/morsel

Repository files navigation

Morsel

Morsel

Daily article digest in a podcast for a few cents an episode. Forward links throughout the day, get a single podcast episode each morning summarizing each article.

How it works

  1. Forward article links to an email address
  2. A daily cron job generates a podcast script (Claude API) based on the articles you've sent, converts it to audio (Edge TTS), and uploads the episode to S3-compatible storage
  3. Subscribe to the RSS feed in any podcast app

Requirements

  • A machine that stays on for daily automation (VM, VPS, Raspberry Pi, other always-on machine, etc.) — or run manually on any machine including macOS
  • Python 3.8+
  • AgentMail account (email ingestion; free up to 3,000 emails/month)
  • Anthropic API key (summarization and podcast transcript, about $0.03 for 4 medium-length articles totaling around 3k words using Haiku 4.5; YMMV and you can try different Anthropic models)
  • S3-compatible storage with public access - Cloudflare R2 (10GB free), AWS S3, Backblaze B2, etc.
  • Jina Reader (for grabbing article text) and Edge TTS (for generating audio) are free and requires no API key or setup

Example

Generated from 3 articles:


example.mp4

Quick start

curl -fsSL https://raw.githubusercontent.com/rdyson/morsel/master/install.sh | bash

The installer downloads the latest release, sets up a Python environment, and walks you through configuration. You'll need your AgentMail API key, Anthropic API key, and S3-compatible storage credentials ready.

Subscribe to <your storage public URL>/feed.xml in any podcast app, and forward article URLs to your AgentMail inbox.

Manual setup

  1. Run the following commands
git clone https://github.com/rdyson/morsel.git
cd morsel
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
cp config.example.json config.json
  1. Update config.json with your credentials.
  2. Create an inbox at AgentMail and put your API key and inbox email address in config.json. You can use an obscure email address to reduce the chances of getting spam.
  3. Add your email address(es) to allowed_senders to restrict who can submit links. If the list is empty, all senders are accepted.
  4. Add any S3-compatible provider. Example with Cloudflare R2:
    1. Create a bucket in the Cloudflare dashboard → R2
    2. Enable public access on the bucket (gives you a pub-xxx.r2.dev URL)
    3. Create an API token with read/write access
    4. Fill in the storage fields in config.json. For AWS S3, set endpoint_url to https://s3.<region>.amazonaws.com. For Backblaze B2, use their S3-compatible endpoint.
  5. Set up the daily cron job. Customize your cron job with help from Crontab Guru. It polls for new emails, generates a digest from queued articles, uploads to storage, and cleans up episodes older than 30 days.
crontab -e
0 4 * * * /path/to/morsel/run_daily.sh >> /path/to/morsel/data/cron.log 2>&1
  1. Subscribe to the feed by adding your feed URL to any podcast app (Apple Podcasts, Overcast, Pocket Casts, etc.).
  2. Send or forward article URLs to your AgentMail email address, and they'll be included in the next morning's episode.

Optional customization

A cover.png is included in the repo. Upload it to your storage bucket and set podcast.image_url in config.json to its public URL. Or use your own square image (minimum 1400x1400px).

Set your preferred voice in config.json under tts.voice.

Running manually

You can also run each step individually, instead of waiting for the cron job:

# Poll for new emails and queue articles
python poll_inbox.py

# Poll continuously (every 60s)
python poll_inbox.py --watch

# Generate a digest from all queued articles
python generate_digest.py

Using with OpenClaw

If you use OpenClaw, you can queue URLs by pasting them in Telegram, WhatsApp, or any other connected channel.

Setup

  1. Install the AgentMail skill if you haven't already:
npx clawhub@latest install agentmail
  1. Copy the Morsel skill into your OpenClaw workspace:
cp -r skills/morsel ~/.openclaw/workspace/skills/morsel
  1. Add the Morsel skill config to ~/.openclaw/openclaw.json:
{
  "skills": {
    "entries": {
      "morsel": {
        "enabled": true,
        "env": {
          "MORSEL_FROM": "your-openclaw-inbox@agentmail.to",
          "MORSEL_INBOX": "your-morsel-inbox@agentmail.to"
        }
      }
    }
  }
}
  1. Add the OpenClaw sender address to allowed_senders in your Morsel config.json.

Now you paste a URL in your chat and it gets queued for the next digest.

License

MIT

About

Forward links, get a daily podcast digest. Scripts that turns article URLs into a single podcast episode via Claude + Edge TTS. 🎙️

Topics

Resources

License

Stars

Watchers

Forks

Contributors