Metadata-Version: 2.4
Name: ez-yt-dlp
Version: 0.2.0
Summary: Small wrapper around yt-dlp for common downloads
Author: Diggaj Upadhyay
License: MIT License
        
        Copyright (c) 2022 Diggaj Upadhyay
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Keywords: youtube,download,video,audio,yt-dlp
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: Console
Classifier: Intended Audience :: End Users/Desktop
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Multimedia :: Video
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: yt-dlp>=2024.0.0
Provides-Extra: dev
Requires-Dist: pytest>=6.0; extra == "dev"
Dynamic: license-file

# ez-yt-dlp

Small, focused wrapper around yt-dlp to make common downloads easier.

This is a single-file Python module that provides a clean CLI for downloading
videos and audio from YouTube and other sites supported by yt-dlp.

## Features

- **Simple CLI** - argparse-based with sensible defaults
- **Interactive mode** - Run without arguments for guided prompts
- **Video/Audio modes** - Download video (mp4) or extract audio (mp3, m4a, etc.)
- **Playlist support** - Download single items or entire playlists
- **Dry-run** - Preview commands before executing
- **Auto-install** - Attempts to install yt-dlp if missing (can be disabled)

## Install

### From source

```bash
# Install dependency (optional if you already have yt-dlp)
python3 -m pip install --user -r requirements.txt

# Run directly
python3 ez_yt_dlp.py --help

# Or install as a package
python3 -m pip install --user .
```

### Make executable (optional)

```bash
chmod +x bin/ez-yt-dlp
cp bin/ez-yt-dlp ~/bin/
```

## Usage

### Interactive mode

```bash
ez-yt-dlp
# or
python3 ez_yt_dlp.py
```

### Command-line mode

```bash
# Download video (default)
ez-yt-dlp "https://www.youtube.com/watch?v=..."

# Download audio (mp3)
ez-yt-dlp --audio "https://www.youtube.com/watch?v=..."

# Download audio playlist as m4a
ez-yt-dlp --audio --format m4a --playlist "https://..."

# Custom output directory
ez-yt-dlp --output ~/Downloads "https://..."

# Dry-run (preview command)
ez-yt-dlp --dry-run --audio "https://..."

# Don't auto-install yt-dlp
ez-yt-dlp --no-install "https://..."
```

### Options

```
positional arguments:
  url                   URL to download (if omitted, interactive mode starts)

optional arguments:
  -h, --help            Show help message
  -v, --video           Download video (default)
  -a, --audio           Extract audio
  -p, --playlist        Download entire playlist
  -o, --output DIR      Save directory (default: ~/Videos)
  -f, --format FMT      Audio format with --audio (e.g., mp3, m4a)
  --dry-run             Print command without executing
  --no-install          Don't auto-install yt-dlp
  --version             Show version and exit
```

## Development

### Run tests

```bash
python3 -m pytest -v
# or without pytest
python3 tools/run_tests_no_pytest.py
```

### Project structure

```
ez-yt-dlp/
├── ez_yt_dlp.py        # Main module
├── bin/ez-yt-dlp       # Executable wrapper
├── tests/test_cli.py   # Test suite
├── pyproject.toml      # Package config
└── README.md           # This file
```

## Requirements

- Python 3.8+
- yt-dlp (auto-installed if missing)

## License

MIT
