mod bindgen;
use clap::Parser;
#[derive(Parser, Debug)]
#[command(author, version, about, long_about=None)]
struct Args {
#[arg(short, long)]
input_file: Option<String>,
#[arg(long)]
uri: String,
}
fn main() {
let args: Args = Args::parse();
let ascii_art = r#"
████████╗██╗ ██╗ █████╗ ███╗ ██╗██╗██╗ ██╗
╚══██╔══╝██║ ██║██╔══██╗████╗ ██║██║╚██╗██╔╝
██║ ███████║███████║██╔██╗ ██║██║ ╚███╔╝
██║ ██╔══██║██╔══██║██║╚██╗██║██║ ██╔██╗
██║ ██║ ██║██║ ██║██║ ╚████║██║██╔╝ ██╗
╚═╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚═╝ ╚═══╝╚═╝╚═╝ ╚═╝
"#;
println!(
"{} \n(c) The Nazara Project. (github.com/The-Nazara-Project)\n
Licensed under the terms of the GPL-v3.0-License.\n\
Check github.com/The-Nazara-Project/Thanix/LICENSE for more info.\n",
ascii_art
);
match args.input_file {
Some(file) => bindgen::gen(file, args.uri),
None => println!("Error: You need to provide a YAML schema to generate from."),
}
}