ptcg-tools/src/cli.rs

27 lines
547 B
Rust
Raw Normal View History

2025-04-28 19:02:32 -04:00
//! CLI parameters
2025-12-28 21:20:16 -03:00
use std::str::FromStr;
use clap::{Parser, Subcommand};
2025-04-28 19:02:32 -04:00
2025-12-28 21:20:16 -03:00
use crate::lang::Language;
2025-04-28 19:02:32 -04:00
#[derive(Debug, Parser)]
#[command(version, about, long_about = None)]
pub struct Args {
#[command(subcommand)]
pub command: Command,
}
#[derive(Debug, Subcommand, PartialEq)]
pub enum Command {
/// Downloads the card data
2025-12-28 21:20:16 -03:00
DownloadData {
/// Language to download the data in
#[arg(short, value_parser=<Language as FromStr>::from_str)]
lang: Language,
},
/// Terminal User Interface
Tui,
2025-04-28 19:02:32 -04:00
}