rust_yt_downloader/
lib.rs

1//! # rust-yt-downloader
2//!
3//! A professional CLI tool for downloading YouTube videos and audio.
4//!
5//! This library provides a complete solution for downloading YouTube content with features including:
6//! - High-quality video downloads with quality selection
7//! - Audio extraction in multiple formats (MP3, FLAC, M4A, WAV, Opus)
8//! - Playlist downloads with parallel processing
9//! - FFmpeg integration for format conversion
10//! - Progress tracking and user feedback
11//! - Comprehensive configuration management
12//!
13//! # Examples
14//!
15//! ```no_run
16//! use rust_yt_downloader::YtDlpClient;
17//!
18//! # fn example() -> Result<(), Box<dyn std::error::Error>> {
19//! let client = YtDlpClient::new();
20//! let info = client.get_video_info("https://www.youtube.com/watch?v=dQw4w9WgXcQ")?;
21//!
22//! println!("Title: {}", info.title);
23//! println!("Duration: {} seconds", info.duration);
24//! # Ok(())
25//! # }
26//! ```
27//!
28//! # Modules
29//!
30//! - [`cli`] - Command-line interface and argument parsing
31//! - [`config`] - Configuration file management
32//! - [`downloader`] - Core download functionality
33//! - [`error`] - Error types and handling
34//! - [`media`] - FFmpeg integration for media processing
35//! - [`progress`] - Progress tracking and display
36//! - [`utils`] - Utility functions and helpers
37//! - [`youtube`] - YouTube API client and metadata extraction
38
39pub mod cli;
40pub mod config;
41pub mod downloader;
42pub mod error;
43pub mod media;
44pub mod progress;
45pub mod utils;
46pub mod youtube;
47
48// Re-export commonly used types for convenience
49pub use config::Config;
50pub use downloader::Downloader;
51pub use error::{AppError, AppResult};
52pub use youtube::YtDlpClient;