progress-pile/cli/src/main.rs

34 lines
716 B
Rust
Raw Normal View History

2025-04-24 09:26:24 +09:00
//mod label;
mod record;
//use label::LabelArgs;
use record::{RecordArgs,RecordAddArgs};
use clap::{Parser, Subcommand};
#[derive(Parser)]
#[command(version, about, long_about = None)]
#[command(propagate_version=true)]
struct Cli {
#[command(flatten)]
add_args: Option<RecordAddArgs>,
#[command(subcommand)]
command: Option<Command>,
}
#[derive(Subcommand)]
enum Command {
//Add(RecordAddArgs),
//Label(LabelArgs),
Record(RecordArgs),
}
2025-04-22 14:38:32 +09:00
fn main() {
2025-04-24 09:26:24 +09:00
let cli = Cli::parse();
match &cli.command {
//Some(Commands::Add(x)) => x.run(),
//Some(Commands::Label(x)) => x.run(),
Some(Command::Record(x)) => x.run(),
None => {unimplemented!()},
}
2025-04-22 14:38:32 +09:00
}