2024-03-12 22:20:03 -04:00
|
|
|
//! Integration with `clap`
|
|
|
|
|
|
2024-03-13 02:12:14 -04:00
|
|
|
use std::path::PathBuf;
|
|
|
|
|
|
2024-03-12 22:20:03 -04:00
|
|
|
use clap::Parser;
|
|
|
|
|
|
|
|
|
|
/// Commandline arguments
|
|
|
|
|
#[derive(Parser, Debug)]
|
|
|
|
|
#[clap(version, about, long_about = None)]
|
|
|
|
|
pub struct Args {
|
|
|
|
|
#[arg(short, long)]
|
|
|
|
|
/// Optional argument to the path of a conduwuit config TOML file
|
2024-03-13 02:12:14 -04:00
|
|
|
pub config: Option<PathBuf>,
|
2024-03-12 22:20:03 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// Parse commandline arguments into structured data
|
|
|
|
|
pub fn parse() -> Args { Args::parse() }
|