Playlist Summarizer
A monorepo containing tools for fetching YouTube playlist transcripts and generating AI-powered summaries using local or cloud-based LLM models via Ollama.
Packages
| Package | Description |
|---|---|
playlist-summarizer-core |
Core library for transcript fetching and AI summarization |
playlist-summarizer-cli |
Command-line interface for the summarizer |
Features
- 📥 Fetch Playlists: Download transcripts from YouTube playlists
- 🤖 AI Summarization: Generate summaries using Ollama models (local or cloud)
- 📝 Markdown Output: Clean, structured summaries in Markdown format
- 🎯 Selective Processing: Choose which videos to summarize
- 📊 Progress Tracking: Real-time progress bars and status updates
- 🔒 Secure Prompts: Hardened system prompts resistant to injection attacks
- 🎨 Rich CLI: Beautiful terminal interface with colors and formatting
Requirements
- Python 3.14+
- Ollama installed and running (for local models)
- Or Ollama Cloud API key (for cloud models)
Quick Start
- Clone the repository:
git clone https://github.com/ajxd2/playlist-summarizer.git
cd playlist-summarizer
- Install dependencies using
uv:
uv sync
- (Optional) Set up environment variables:
cp .env.example .env
# Edit .env and add:
# OLLAMA_HOST=http://localhost:11434 # Optional, defaults to localhost
# OLLAMA_API_KEY=your_api_key_here # Required for cloud models
- Run the CLI:
uv run playlist-summarizer
Project Structure
playlist-summarizer/
├── packages/
│ ├── core/ # Core library
│ │ ├── src/
│ │ │ └── playlist_summarizer_core/
│ │ │ ├── __init__.py
│ │ │ ├── fetcher.py # YouTube transcript fetching
│ │ │ └── summarizer.py # AI summarization logic
│ │ ├── pyproject.toml
│ │ └── README.md
│ └── cli/ # CLI application
│ ├── src/
│ │ └── playlist_summarizer_cli/
│ │ ├── __init__.py
│ │ ├── __main__.py
│ │ └── main.py # CLI entry point
│ ├── pyproject.toml
│ └── README.md
├── transcripts/ # Downloaded transcripts (gitignored)
├── summaries/ # Generated summaries (gitignored)
├── pyproject.toml # Workspace configuration
├── uv.lock # Dependency lock file
└── README.md
Usage
Using the CLI
Run the CLI application:
uv run playlist-summarizer
Fetch Playlist Transcripts
- Select "Fetch playlist" from the main menu
- Enter the YouTube playlist URL
- Specify the output directory (defaults to
transcripts/{playlist_id}/) - Transcripts will be saved as
.txtfiles
Summarize Playlists
- Select "Summarize playlist" from the main menu
- Enter the directory path containing transcripts (defaults to
transcripts/) - Choose the Ollama model to use (e.g.,
gemma3:4b,llama3.1:8b,qwen2.5:7b) - Specify the output directory for summaries (defaults to
summaries/) - Select a playlist folder
- Choose which videos to summarize (use space to select/deselect)
- Optionally create a master summary of all video summaries
Using the Core Library
from playlist_summarizer_core import get_playlist_videos, get_transcript, Summarizer
# Fetch transcripts
videos = get_playlist_videos("https://www.youtube.com/playlist?list=...")
for video in videos:
transcript = get_transcript(video)
print(f"{video.title}: {len(transcript)} characters")
# Summarize content
summarizer = Summarizer(model="gemma3:4b")
summary = summarizer.summarize("Your transcript text...")
Configuration
Environment Variables
OLLAMA_HOST- Ollama server URL (default:http://localhost:11434)OLLAMA_API_KEY- API key for Ollama Cloud (required for cloud models)
Default Directories
- Transcripts:
transcripts/ - Summaries:
summaries/
Development
Setup Development Environment
uv sync
Run from Source
# Run CLI
uv run playlist-summarizer
# Or run as module
uv run python -m playlist_summarizer_cli
Working with Individual Packages
# Work on core package
cd packages/core
uv sync
# Work on CLI package
cd packages/cli
uv sync
License
MIT License - see LICENSE file for details.
Contributing
Contributions are welcome! Please feel free to submit a Pull Request. See CONTRIBUTING.md for guidelines.
Author
Anthony Kovach - aj@ajxd2.dev
Metadata
Release files for playlist-summarizer 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| playlist_summarizer-0.1.0.tar.gz | 3.7 kB | Without provenance | Details for playlist_summarizer-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| playlist_summarizer-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for playlist_summarizer-0.1.0-py3-none-any.whl |
Total release size: 7.7 kB
Release files / playlist_summarizer-0.1.0.tar.gz
| Download URL | playlist_summarizer-0.1.0.tar.gz |
|---|---|
| Size | 3.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d4cf083e94b434630618b6443080a11dd5751facc57c6f6ba62809638309c156
|
|
BLAKE2b-256 checksum How to use checksums |
95e1d2ffdd9da9284727af7fe970f5e6e41cbe86fdf40b82c4e01d7885691a21
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.9.18 {"installer":{"name":"uv","version":"0.9.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / playlist_summarizer-0.1.0-py3-none-any.whl
| Download URL | playlist_summarizer-0.1.0-py3-none-any.whl |
|---|---|
| Size | 4.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c197dfe5464066850dc4f1abfe4d007401c1d20a7210caa96d5a4aeabd1ed8f4
|
|
BLAKE2b-256 checksum How to use checksums |
fc9880cb453d291730e2a0a74564e648a5faf1ee663740f2e2a998bf13416bec
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.9.18 {"installer":{"name":"uv","version":"0.9.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for playlist-summarizer 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.