parse Args for directory
This commit is contained in:
parent
536534bb04
commit
fbcbb661ea
3 changed files with 14 additions and 0 deletions
|
@ -5,6 +5,7 @@ pub mod feed;
|
|||
pub mod file;
|
||||
pub mod history;
|
||||
pub mod network;
|
||||
pub mod params;
|
||||
pub mod prelude;
|
||||
|
||||
#[cfg(test)]
|
||||
|
|
|
@ -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,
|
||||
|
|
9
src/params/mod.rs
Normal file
9
src/params/mod.rs
Normal file
|
@ -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,
|
||||
}
|
Loading…
Add table
Reference in a new issue