2022-01-04 02:15:28 +00:00
|
|
|
use clap::Parser;
|
2022-01-03 01:20:09 +00:00
|
|
|
|
|
|
|
#[derive(Parser)]
|
|
|
|
#[clap(author, version)]
|
|
|
|
#[clap(about = "Music playlist scripting language runtime")]
|
|
|
|
pub struct CliArgs {
|
|
|
|
/// Script to run
|
|
|
|
pub file: Option<String>,
|
2022-01-04 01:15:19 +00:00
|
|
|
|
2022-01-03 01:20:09 +00:00
|
|
|
/// Generate m3u8 playlist
|
|
|
|
#[clap(short, long)]
|
|
|
|
pub playlist: Option<String>,
|
2022-01-04 01:15:19 +00:00
|
|
|
|
|
|
|
/// In REPL mode, wait for all music in the queue to complete before accepting new input
|
|
|
|
#[clap(long)]
|
2022-01-03 22:53:57 +00:00
|
|
|
pub wait: bool,
|
2022-01-04 01:15:19 +00:00
|
|
|
|
|
|
|
/// In REPL mode, the prompt to display
|
|
|
|
#[clap(long, default_value_t = String::from("|"))]
|
2022-01-04 02:15:28 +00:00
|
|
|
pub prompt: String,
|
2022-01-03 01:20:09 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
pub fn parse() -> CliArgs {
|
|
|
|
CliArgs::parse()
|
|
|
|
}
|