A rust port of vgm2mid by Paul Jensen and Valley Bell
mod cli;

use vgm_rs::config;
use vgm_rs::convert_to_mid;

use vgm_rs::FileType;
use anyhow::Result;

fn main() -> Result<()> {
	let (in_path, out_path, config_path, file_type, verbose, strict) = cli::cli()?;

	let mut config = config::load_config_or_default(config_path.as_deref())?;
	config.strict = strict;
	config.verbose = verbose;

	convert_to_mid(
		&in_path,
		file_type,
		&out_path,
		&config,
	)
}