Skip to content

BeneKenobi/podcast_filter

Repository files navigation

Podcast Filter

A simple web service that filters podcast RSS feeds based on episode title patterns. Built with FastAPI and Python.

Features

  • Filter podcast episodes using regex patterns
  • Web interface for generating filtered feed URLs
  • Caching of RSS feeds for better performance
  • Docker support for easy deployment
  • Configurable via environment variables or config file

Quick Start

Using Docker

docker pull ghcr.io/benekenobi/podcast-filter
docker run -p 8000:8000 ghcr.io/benekenobi/podcast-filter

Local Development

  1. Clone the repository
  2. Install dependencies with uv:
curl -LsSf https://astral.sh/uv/install.sh | sh
uv sync --frozen
uv pip install --no-cache .
  1. Run the server:
python -m app.main

Visit http://localhost:8000 to access the web interface.

Configuration

Configuration can be done via environment variables or the config.ini file:

Config Option Environment Variable Default Description
Cache Size PODCAST_FILTER_CACHE_MAX_SIZE 100 Maximum number of RSS feeds to cache
Cache TTL PODCAST_FILTER_CACHE_TTL_SECONDS 3600 Time-to-live for cached feeds in seconds
Server Port PODCAST_FILTER_SERVER_PORT 8000 Port the server listens on
Server Host PODCAST_FILTER_SERVER_HOST 0.0.0.0 Host address to bind to
Base URL PODCAST_FILTER_BASE_URL http://localhost:8000 Base URL for the server

API Usage

Filter Endpoint

GET /filter?url={podcast_url}&filter={regex_pattern}

Parameters:

  • url: URL-encoded podcast RSS feed URL
  • filter: URL-encoded regex pattern to match episode titles

Example:

http://localhost:8000/filter?url=https://example.com/feed.rss&filter=Interview

Development

Running Tests

pytest tests/

Docker Build

docker build -t podcast-filter .