51 lines
1.2 KiB
Rust
51 lines
1.2 KiB
Rust
use clap::{Parser, Subcommand};
|
|
|
|
/// Tool collection for work at RCC.
|
|
/// Make sure have some config files in your config folder .config/rcc/
|
|
/// with live and stage as environment. Containing DB_USER, DB_PASSWORD, DB_LOCATION, DB_PORT.
|
|
#[derive(Parser)]
|
|
#[command(name = "RCC")]
|
|
#[command(author = "Mathias Rothenhaeusler")]
|
|
#[command(version = "1.0")]
|
|
pub struct Cli {
|
|
#[arg(short = 'e', long = "env")]
|
|
pub env: Option<String>,
|
|
#[arg(short = 't', long = "target")]
|
|
pub target: Option<String>,
|
|
#[command(subcommand)]
|
|
pub mode: Commands,
|
|
}
|
|
|
|
#[derive(Subcommand)]
|
|
pub enum Commands {
|
|
Merch {
|
|
// #[arg(short = 's', long = "search")]
|
|
search: Option<String>,
|
|
},
|
|
Schema {
|
|
// #[arg(short = 's', long = "search")]
|
|
search: Option<String>,
|
|
},
|
|
Filter {
|
|
filter_id: usize,
|
|
#[arg(short, long)]
|
|
all: bool,
|
|
#[arg(short, long)]
|
|
config: bool,
|
|
#[arg(short, long)]
|
|
log: bool,
|
|
},
|
|
Page {
|
|
// #[arg(short, long)]
|
|
page_id: usize,
|
|
},
|
|
Job {
|
|
job_id: usize,
|
|
#[arg(short, long)]
|
|
log: bool,
|
|
},
|
|
Use {
|
|
file_name: String,
|
|
}
|
|
}
|