1use clap::Parser;
2use std::path::PathBuf;
3
4use crate::format;
5
6#[derive(Debug, Parser)]
8#[clap(
9 about = "Yet Another Texture Packer - a small and simple CLI application to pack \nmultiple textures/sprites into a texture atlas/sprite sheet."
10)]
11#[clap(version = env!("CARGO_PKG_VERSION"))]
12pub struct Cli {
13 #[clap(value_parser, help = "Files and folders to pack")]
15 pub inputs: Vec<PathBuf>,
16
17 #[clap(
19 short,
20 long,
21 value_parser,
22 default_value_t = 0,
23 help = "Gap between packed textures"
24 )]
25 pub gap: u32,
26
27 #[clap(short, long, arg_enum, value_parser, default_value_t = format::ImageFormat::Png, help = "Output format of atlas")]
29 pub image: format::ImageFormat,
30
31 #[clap(
33 short,
34 long,
35 arg_enum,
36 value_parser,
37 help = "Output format of dictionary (optional)"
38 )]
39 pub dict: Option<format::DictionaryFormat>,
40
41 #[clap(short, long, value_parser, default_value_t = String::from("atlas"), help = "Name of output file(s)")]
43 pub output: String,
44
45 #[clap(
47 short,
48 long,
49 value_parser,
50 default_value_t = 1024,
51 help = "Width of output atlas"
52 )]
53 pub width: u32,
54
55 #[clap(
57 short,
58 long,
59 value_parser,
60 default_value_t = 1024,
61 help = "Height of output atlas"
62 )]
63 pub height: u32,
64}