37 lines
954 B
Rust
37 lines
954 B
Rust
use clap::{Parser, Subcommand};
|
|
|
|
#[derive(Parser, Debug)]
|
|
#[command(version, about, long_about = None)]
|
|
pub(crate) struct Args {
|
|
#[command(subcommand)]
|
|
pub(crate) command: Commands,
|
|
}
|
|
|
|
#[derive(Subcommand, Debug)]
|
|
pub(crate) enum Commands {
|
|
/// Tools to solve the wordle
|
|
Solve {
|
|
/// Contains these letters
|
|
#[arg(short, long)]
|
|
r#in: Option<String>,
|
|
|
|
/// Has these position, as a regex, use ^start, end$ and wor.d extensively
|
|
#[arg(short, long)]
|
|
pos: Option<String>,
|
|
|
|
/// Doesnt contains these letters
|
|
#[arg(short, long)]
|
|
out: Option<String>,
|
|
},
|
|
/// Tools to calculate best words for a wordle
|
|
Calculate {
|
|
/// Number of guesses targetted
|
|
#[arg(short, long)]
|
|
number: Option<usize>,
|
|
|
|
/// How many branches to try, warning exponential solving time
|
|
#[arg(short, long, default_value_t = 5)]
|
|
depth: usize,
|
|
},
|
|
}
|