ptcg-tools/src/cli.rs

26 lines
547 B
Rust

//! CLI parameters
use std::str::FromStr;
use clap::{Parser, Subcommand};
use crate::lang::Language;
#[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
DownloadData {
/// Language to download the data in
#[arg(short, value_parser=<Language as FromStr>::from_str)]
lang: Language,
},
/// Terminal User Interface
Tui,
}