Files
ascii/src/main.rs
2024-07-07 23:58:15 +02:00

50 lines
1.2 KiB
Rust

use clap::Parser;
mod libs;
fn main() {
eprintln!("ASCII Generator\n----------------");
let args = libs::args::Args::parse();
match args.command {
Some(libs::args::Subcommands::Gen {
image,
invert,
colorful,
width,
height,
pixel,
noresize,
matrix,
nofill,
output,
lightmap,
}) => {
libs::gen_handler::generator(
image, invert, colorful, width, height, pixel, noresize, matrix, nofill, output,
lightmap,
);
}
Some(libs::args::Subcommands::Cam {
invert,
colorful,
width,
height,
pixel,
noresize,
matrix,
nofill,
lightmap,
}) => {
libs::cam_handler::video(
invert, colorful, width, height, pixel, noresize, matrix, nofill, lightmap,
);
}
None => {
eprintln!("No subcommand provided. Available subcommands: `gen`, `cam`");
std::process::exit(1);
}
}
}