hkxc/args/
dump.rs
1use std::path::PathBuf;
3
4pub const EXAMPLES: &str = color_print::cstr!(
6 r#"<blue><bold><underline>Examples</underline></bold></blue>
7- <blue!>hkx -> hexdump -> stdout</blue!>
8 <cyan!>hkxc dump</cyan!> ./defaultmale.hkx
9
10- <blue!>hkx -> hexdump -> a file</blue!>
11 <cyan!>hkxc dump</cyan!> ./defaultmale.hkx <cyan!>-o</cyan!> hexdump.txt
12
13 - <blue!>hexdump -> hkx -> a file</blue!><yellow>(NOTE: For reverse conversion, use `-o` to specify the output path.)</yellow>
14 <cyan!>hkxc dump</cyan!> hexdump.txt <cyan!>-o</cyan!> ./defaultmale.hkx -r
15"#
16);
17
18#[derive(Debug, clap::Args)]
19#[clap(arg_required_else_help = true, after_long_help = EXAMPLES)]
20pub(crate) struct Args {
21 pub input: PathBuf,
23 #[clap(short, long)]
25 #[clap(long_help = "Output path to write a file.
26NOTE: Bytes cannot be written to stdout, so always use `-o` to specify the output when use `--reverse`.")]
27 pub output: Option<PathBuf>,
28
29 #[clap(short, long)]
31 pub reverse: bool,
32}