hkxc/args/
tree.rs

1//! Show dependency tree from havok behavior state machine (hkx/xml file)
2use std::path::PathBuf;
3
4/// ANSI color representation command examples.
5pub const EXAMPLES: &str = color_print::cstr!(
6    r#"<blue><bold><underline>Examples</underline></bold></blue>
7- <blue!>xml -> dependencies tree -> stdout</blue!>
8  <cyan!>hkxc tree</cyan!> ./defaultmale.xml
9
10- <blue!>hkx -> dependencies tree -> stdout(+log)</blue!>
11  <cyan!>hkxc tree</cyan!> ./defaultmale.hkx <cyan!>--log-level</cyan!> trace <cyan!>--log-file</cyan!> ./hkx_tree.log
12
13- <blue!>hkx -> dependencies tree -> a file</blue!>
14  <cyan!>hkxc tree</cyan!> ./defaultmale.hkx <cyan!>-o</cyan!> tree.txt
15"#
16);
17
18#[derive(Debug, clap::Args)]
19#[clap(arg_required_else_help = true, after_long_help = EXAMPLES)]
20pub(crate) struct Args {
21    /// hkx/xml file path
22    pub input: PathBuf,
23    /// If specified, write to a file (If not specified, stdout)
24    #[clap(short, long)]
25    pub output: Option<PathBuf>,
26}