Initial commit

This commit is contained in:
VC
2023-09-29 17:16:47 +02:00
commit 65cbb89eb5
7 changed files with 1350 additions and 0 deletions

25
src/main.rs Normal file
View File

@@ -0,0 +1,25 @@
use clap::{Arg, Command};
use tootube::*;
const DEFAULT_CONFIG_PATH: &str = "/usr/local/etc/tootube.toml";
fn main() {
let matches = Command::new(env!("CARGO_PKG_NAME"))
.version(env!("CARGO_PKG_VERSION"))
.about("A simple PeerTube to YouTube converter")
.arg(
Arg::new("config")
.short('c')
.long("config")
.value_name("CONFIG_FILE")
.help("TOML config file for tootube")
.num_args(1)
.default_value(DEFAULT_CONFIG_PATH)
.display_order(1),
)
.get_matches();
let config = parse_toml(matches.get_one::<String>("config").unwrap());
run(config);
}