use std::path::PathBuf; use clap::Parser; use clap_derive::Parser; use dyesub::Result; #[derive(Parser, Debug)] #[command(author, version, about, long_about = None)] struct Args { /// Input KLE JSON path input: PathBuf, /// Output SVG path #[arg(short, long)] output: Option, } fn main() -> Result<()> { let args = Args::parse(); let output = args.output.unwrap_or_else(|| { let mut path = args.input.clone(); path.set_extension("svg"); path }); dyesub::render_file(&args.input, &output)?; Ok(()) }