mirror of
https://framagit.org/veretcle/tootube.git
synced 2025-07-21 13:24:19 +02:00
Initial commit
This commit is contained in:
25
src/main.rs
Normal file
25
src/main.rs
Normal 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);
|
||||
}
|
Reference in New Issue
Block a user