2022-08-16 09:05:18 +01:00
|
|
|
pub mod args;
|
|
|
|
pub mod commands;
|
|
|
|
pub mod meta;
|
|
|
|
pub mod types;
|
|
|
|
pub mod utils;
|
|
|
|
|
2022-10-22 14:16:02 +01:00
|
|
|
use args::{CLIArgs, Commands};
|
|
|
|
use clap::Parser;
|
|
|
|
|
|
|
|
use commands::copy::copy_command;
|
|
|
|
use commands::genhtml::genhtml_command;
|
2022-12-14 14:08:46 +00:00
|
|
|
use commands::get_tags::get_tags_command;
|
2022-10-22 14:16:02 +01:00
|
|
|
use commands::process::process_command;
|
2022-12-14 14:08:46 +00:00
|
|
|
use commands::set_tags::set_tags_command;
|
2022-10-22 14:16:02 +01:00
|
|
|
use commands::transcode::transcode_command;
|
|
|
|
|
2022-08-16 09:05:18 +01:00
|
|
|
fn main() -> Result<(), Box<dyn std::error::Error>> {
|
2023-10-19 17:22:01 +01:00
|
|
|
let cli = CLIArgs::parse();
|
2022-08-16 09:05:18 +01:00
|
|
|
|
2023-10-19 17:22:01 +01:00
|
|
|
let command = cli.command.to_owned();
|
2023-08-31 23:50:30 +01:00
|
|
|
|
2023-10-19 17:22:01 +01:00
|
|
|
match command {
|
|
|
|
Commands::Process(process_args) => {
|
|
|
|
return process_command(cli, &process_args);
|
|
|
|
}
|
|
|
|
Commands::Genhtml(genhtml_args) => {
|
|
|
|
return genhtml_command(cli, &genhtml_args);
|
|
|
|
}
|
|
|
|
Commands::Transcode(transcode_args) => {
|
|
|
|
return transcode_command(cli, &transcode_args);
|
|
|
|
}
|
|
|
|
Commands::Copy(copy_args) => {
|
|
|
|
return copy_command(cli, ©_args);
|
|
|
|
}
|
|
|
|
Commands::SetTags(set_tags_args) => {
|
|
|
|
return set_tags_command(cli, &set_tags_args);
|
|
|
|
}
|
|
|
|
Commands::GetTags(get_tags_args) => {
|
|
|
|
return get_tags_command(cli, &get_tags_args);
|
|
|
|
}
|
|
|
|
}
|
2022-08-16 09:05:18 +01:00
|
|
|
}
|