feat 处理命令行输入.
This commit is contained in:
+15
-2
@@ -1,3 +1,16 @@
|
||||
fn main() {
|
||||
println!("Hello, world!");
|
||||
mod merge;
|
||||
|
||||
use std::env;
|
||||
use std::error::Error;
|
||||
use std::io::Result;
|
||||
use std::path::PathBuf;
|
||||
|
||||
fn main() -> Result<()> {
|
||||
let args: Vec<String> = env::args().collect();
|
||||
let merge_path = if args.len() > 1 {
|
||||
PathBuf::from(args[1].as_str())
|
||||
} else {
|
||||
PathBuf::from(".")
|
||||
};
|
||||
merge::merge_video_from_path(&merge_path)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user