diff --git a/src/lib.rs b/src/lib.rs index d59f443..abf5ed9 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -5,6 +5,7 @@ pub mod feed; pub mod file; pub mod history; pub mod network; +pub mod params; pub mod prelude; #[cfg(test)] diff --git a/src/main.rs b/src/main.rs index c1c31ca..5d830ab 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,5 +1,7 @@ +use clap::Parser; use podal::file::FileEnv; use podal::network::NetworkEnv; +use podal::params::Args; use podal::prelude::*; fn main() -> Result<()> { @@ -8,6 +10,8 @@ fn main() -> Result<()> { let history = "downloaded.txt"; let site = "https://www.youtube.com/"; + let args = Args::parse(); + podal::run( subscriptions, history, diff --git a/src/params/mod.rs b/src/params/mod.rs new file mode 100644 index 0000000..53c561b --- /dev/null +++ b/src/params/mod.rs @@ -0,0 +1,9 @@ +use clap::Parser; + +#[derive(Parser, Debug)] +pub struct Args { + /// The directory to download mp3 files into + /// Defaults to the current directory + #[arg(short, long)] + pub directory: String, +}