#![warn(clippy::pedantic)]
mod cli;
mod constants;
use spongemock::Spongemock;
fn main() -> Result<(), anyhow::Error> {
let matches = cli::configure_parser().get_matches();
if matches.is_present("no-quiet") {
eprintln!("{} {}", constants::NAME, constants::VERSION);
eprintln!("{}\n", constants::LICENSE);
}
let mut cli_options = cli::get_options(&matches)?;
cli_options.text.mock(&cli_options.config);
if cli_options.no_newline {
print!("{}", cli_options.text);
} else {
println!("{}", cli_options.text);
}
Ok(())
}