Open source
Subreddit Sounds
github.com/matt-taylor-tech/subreddit-sounds ↗
Python FastAPI SQLite SQLAlchemy 2.0 APScheduler Jinja2 Docker Reddit API Spotify API
I built Subreddit Sounds to turn music shared on Reddit into a Spotify playlist that refreshes daily. It runs unattended in a Docker container, and I listen to the resulting playlist while working and in the workshop.
What it does each day
- Pulls the top posts from the chosen subreddit(s), via Reddit's public RSS feed or the OAuth API if credentials are added.
- Resolves each post to a Spotify track. Direct Spotify links are taken as-is; YouTube links get their title and artist parsed (using the channel as an artist hint) and searched on Spotify. Results are filtered by genre and minimum duration, and full-album links are skipped.
- Optionally pulls Bandcamp new releases by tag.
- Reconciles the playlist to the latest N tracks (default 25), adding new finds and trimming the oldest, so it's a rolling, always-current playlist rather than an ever-growing dump.
Architecture
- Backend: Python + FastAPI
- Database: SQLite via SQLAlchemy 2.0 for run history and configuration
- Admin UI: Server-rendered Jinja2 templates with login, a manual Run now trigger, and run-history pages with full per-run logs
- Setup: Browser-based first-run wizard: credentials are entered in the UI, so no API keys live on disk
- Auth: Single local admin login with
passlib[bcrypt]anditsdangerous-signed sessions - Scheduler: APScheduler running an in-app daily job at a configurable time
- HTTP:
httpxfor the Reddit, YouTube, Bandcamp, and Spotify calls - Deployment: Single-container Docker, runs on any Docker host
- Testing: pytest
Maintaining it
Regular use gives me a reason to keep improving track matching, filters, and scheduled refreshes. The public repository includes the application and setup instructions.
Skills exercised