mirror of
https://github.com/eRgo35/ascii.git
synced 2026-02-04 04:46:09 +01:00
50 lines
1.2 KiB
Rust
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);
|
|
}
|
|
}
|
|
}
|