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;
|
|
|
|
|
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 {
|
2023-10-19 17:39:28 +01:00
|
|
|
Commands::Process(subcommand_args) => {
|
|
|
|
return commands::process::process_command(cli, &subcommand_args);
|
2023-10-19 17:22:01 +01:00
|
|
|
}
|
2023-10-19 17:48:23 +01:00
|
|
|
#[cfg(feature = "command_genhtml")]
|
2023-10-19 17:39:28 +01:00
|
|
|
Commands::Genhtml(subcommand_args) => {
|
|
|
|
return commands::genhtml::genhtml_command(cli, &subcommand_args);
|
2023-10-19 17:22:01 +01:00
|
|
|
}
|
2023-10-19 17:39:28 +01:00
|
|
|
Commands::Transcode(subcommand_args) => {
|
|
|
|
return commands::transcode::transcode_command(cli, &subcommand_args);
|
2023-10-19 17:22:01 +01:00
|
|
|
}
|
2023-10-19 17:39:28 +01:00
|
|
|
Commands::Copy(subcommand_args) => {
|
|
|
|
return commands::copy::copy_command(cli, &subcommand_args);
|
2023-10-19 17:22:01 +01:00
|
|
|
}
|
2023-10-19 17:39:28 +01:00
|
|
|
Commands::Tags(subcommand_args) => {
|
|
|
|
return commands::tags::tags_command(cli, &subcommand_args);
|
2023-10-19 17:22:01 +01:00
|
|
|
}
|
|
|
|
}
|
2022-08-16 09:05:18 +01:00
|
|
|
}
|