49 lines
1.1 KiB
Rust
49 lines
1.1 KiB
Rust
use camino::Utf8PathBuf;
|
|
use clap::{Parser, Subcommand};
|
|
|
|
|
|
#[allow(clippy::pedantic)]
|
|
#[derive(Debug, Parser, Default, Clone)]
|
|
pub struct CliArgs {
|
|
/// Show more info
|
|
#[arg(long, short)]
|
|
pub debug: bool,
|
|
|
|
/// Path to manifest
|
|
#[arg(long, short, default_value_t=Utf8PathBuf::from("./manifest.json"))]
|
|
pub manifest: Utf8PathBuf,
|
|
|
|
/// Output directory
|
|
#[arg(long, short, default_value_t=Utf8PathBuf::from("./out"))]
|
|
pub output: Utf8PathBuf,
|
|
|
|
/// Config path
|
|
#[arg(long, short, default_value_t=Utf8PathBuf::from("./config.json"))]
|
|
pub config: Utf8PathBuf,
|
|
|
|
#[command(subcommand)]
|
|
pub command: Option<CliCommand>,
|
|
|
|
}
|
|
|
|
#[allow(clippy::pedantic)]
|
|
#[derive(Debug, Subcommand, Clone)]
|
|
pub enum CliCommand {
|
|
Download,
|
|
Add {
|
|
#[arg(long, short)]
|
|
url: String,
|
|
#[arg(long, short)]
|
|
name: String,
|
|
#[arg(long, short)]
|
|
playlist: String
|
|
},
|
|
AddPlaylist {
|
|
#[arg(long, short)]
|
|
url: String,
|
|
#[arg(long, short)]
|
|
name: String
|
|
},
|
|
Gui
|
|
}
|