use clap::{Parser, Subcommand};
pub mod cmds;
#[derive(Parser)]
#[command(name = env!("CARGO_PKG_NAME"))]
#[command(version = env!("CARGO_PKG_VERSION"))]
#[command(author = env!("CARGO_PKG_AUTHORS"))]
#[command(about = format!("{}\n\nAuthor: {}", env!("CARGO_PKG_DESCRIPTION"), env!("CARGO_PKG_AUTHORS")))]
struct Cli {
#[command(subcommand)]
command: Commands,
}
#[derive(Subcommand)]
enum Commands {
Uuid(cmds::UuidCmd),
Pw(cmds::PwCmd),
Ip(cmds::IpCmd),
Sys(cmds::SysCmd),
Time(cmds::TimeCmd),
Hash(cmds::HashCmd),
B64(cmds::B64Cmd),
Base(cmds::BaseCmd),
}
fn main() {
let cli = Cli::parse();
match cli.command {
Commands::Uuid(cmd) => cmd.execute(),
Commands::Pw(cmd) => cmd.execute(),
Commands::Ip(cmd) => cmd.execute(),
Commands::Sys(cmd) => cmd.execute(),
Commands::Time(cmd) => cmd.execute(),
Commands::Hash(cmd) => cmd.execute(),
Commands::B64(cmd) => cmd.execute(),
Commands::Base(cmd) => cmd.execute(),
}
}