hkxc/args/
diff.rs

1use std::path::PathBuf;
2
3/// ANSI color representation command examples.
4pub const EXAMPLES: &str = color_print::cstr!(
5    r#"<blue><bold><underline>Examples</underline></bold></blue>
6- <blue!>XML diff -> stdout</blue!>
7  <cyan!>hkxc diff</cyan!> ./defaultmale_by_hkxcmd.xml ./defaultmale_by_HavokBehaviorProcess.xml
8
9- <blue!>hkx hexdump diff -> stdout</blue!>
10  <cyan!>hkxc diff</cyan!> ./defaultmale_by_hkxcmd.hkx ./defaultmale_by_HavokBehaviorProcess.hkx
11
12- <blue!>hexdump diff -> a file</blue!>
13  <cyan!>hkxc diff</cyan!> ./defaultmale_x86_hexdump.txt ./defaultmale_x64_hexdump.txt <cyan!>-o</cyan!> diff.txt
14"#
15);
16
17#[derive(Debug, clap::Args)]
18#[clap(arg_required_else_help = true, after_long_help = EXAMPLES)]
19pub(crate) struct Args {
20    /// Old path
21    pub old: PathBuf,
22    /// New path
23    pub new: PathBuf,
24
25    /// Output with ANSI color (For standard output)
26    #[clap(long)]
27    pub color: bool,
28
29    /// If specified, write to a file (If not specified, stdout)
30    #[clap(short, long)]
31    pub output: Option<PathBuf>,
32}