A CLI tool to batch download YouTube subtitles and convert them into Obsidian-compatible Markdown notes with YAML frontmatter. The tool processes YouTube video URLs, downloads metadata and subtitles, enriches content with LLM-based corrections and theme analysis, and organizes output files into a structured directory hierarchy.
Version: v0.8.5
- Batch Processing: Process multiple YouTube videos in parallel
- LLM-Enhanced Content:
- Automatic subtitle correction using LLM
- Language detection from metadata
- Theme and tag extraction
- Contextual focus analysis
- Smart Chunking: Pause-based chunking strategy that splits subtitles at natural speech pauses
- SponsorBlock Integration: Automatically filters sponsor segments from subtitles before processing
- Structured Output: Organized directory structure by channel with metadata, subtitles, corrections, and notes
- Flexible Input: Accept single links, comma-separated lists, or file inputs
- Dual Interface: Interactive menu and command-line modes
- Configurable: Extensive YAML-based configuration system
Install Python and Git using Windows Package Manager (winget):
# Install Python
winget install Python.Python.3.12
# Install Git
winget install Git.GitAfter installation, restart your terminal or add Python to PATH manually.
- Clone the repository:
git clone https://github.com/rusteddaemond/RD-Markdown-tools.git
cd RD-Markdown-tools- Install dependencies:
cd data
pip install -r requirements.txt- Set up environment variables:
- Create a
.envfile in thedatadirectory - Add your LLM API key:
LLM_API_KEY=your_api_key_here
- Create a
All configuration is managed through YAML files in the data/config/ directory. See codebase.md for a complete list of all configuration files and their purposes.
Place .txt files containing YouTube links in the input directory, then run:
python input/run.pyThe script will:
- Process all
.txtfiles in theinputdirectory - Read YouTube links from each file (supports comma-separated or line-separated links)
- Process videos and save output to the
outputdirectory - Delete processed files after successful processing
Example input file (input/videos.txt):
https://youtu.be/VIDEO_ID1
https://youtu.be/VIDEO_ID2, https://youtu.be/VIDEO_ID3
https://youtu.be/VIDEO_ID4
cd data
python cli/main.pyPresents a menu with options:
- Change working directory
- Input YouTube links
- Exit
cd data
# Process a single video
python cli/main.py --links "https://youtu.be/VIDEO_ID"
# Process multiple videos
python cli/main.py --links "https://youtu.be/VIDEO1,https://youtu.be/VIDEO2"
# Process from file
python cli/main.py --links links.txt
# Set output directory
python cli/main.py --cwd /path/to/output --links "https://youtu.be/VIDEO_ID"
# Exit immediately after processing (for scripting)
python cli/main.py --links "https://youtu.be/VIDEO_ID" --exitSee codebase.md for detailed project structure, architecture documentation, and testing information.
Copyright (C) 2024 RD-Markdown-tools contributors
This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License along with this program. If not, see https://www.gnu.org/licenses/.