use clap::{Args, Parser, Subcommand};
use std::path::PathBuf;
#[derive(Parser)]
#[clap(author, version, about, long_about = None, propagate_version = true)]
pub struct AppArgs {
#[clap(short = 'u', long)]
pub read_unpacked: bool,
#[clap(subcommand)]
pub subcommand: AppSubcommand,
}
#[derive(Subcommand)]
pub enum AppSubcommand {
Pack(PackArgs),
List(ListArgs),
Extract(ExtractArgs),
ExtractFile(ExtractFileArgs),
}
#[derive(Args)]
pub struct PackArgs {
#[clap(long)]
pub ordering: Option<PathBuf>,
#[clap(long)]
pub unpack: Option<String>,
#[clap(long)]
pub unpack_dir: Option<String>,
#[clap(long)]
pub exclude_hidden: bool,
#[clap(value_parser)]
pub dir: PathBuf,
#[clap(value_parser)]
pub output: PathBuf,
}
#[derive(Args)]
pub struct ListArgs {
#[clap(value_parser)]
pub archive: PathBuf,
}
#[derive(Args)]
pub struct ExtractArgs {
#[clap(value_parser)]
pub archive: PathBuf,
#[clap(value_parser)]
pub destination: PathBuf,
}
#[derive(Args)]
pub struct ExtractFileArgs {
#[clap(value_parser)]
pub archive: PathBuf,
#[clap(value_parser)]
pub filename: PathBuf,
}