mirror of
https://github.com/iluvcapra/bwavfile.git
synced 2025-12-31 17:00:44 +00:00
Added CLI options
This commit is contained in:
@@ -4,7 +4,41 @@
|
|||||||
//! This program demonstrats combining several wave files into a single
|
//! This program demonstrats combining several wave files into a single
|
||||||
//! polyphonic wave file.
|
//! polyphonic wave file.
|
||||||
|
|
||||||
fn main() -> std::io::Result<()> {
|
extern crate clap;
|
||||||
|
|
||||||
|
use std::io;
|
||||||
|
use clap::{Arg, App};
|
||||||
|
|
||||||
|
fn main() -> io::Result<()> {
|
||||||
|
|
||||||
|
let matches = App::new("wave-deinter")
|
||||||
|
.version("0.1")
|
||||||
|
.author("Jamie Hardt")
|
||||||
|
.about("Extract each channel of a polyphonic wave file as a new monoaural wave file.")
|
||||||
|
.arg(Arg::with_name("OUTPUT")
|
||||||
|
.long("output")
|
||||||
|
.short("o")
|
||||||
|
.help("Output file basename. If absent, will be the basename of INPUT.")
|
||||||
|
)
|
||||||
|
.arg(Arg::with_name("numeric_names")
|
||||||
|
.long("numeric")
|
||||||
|
.short("n")
|
||||||
|
.help("Use numeric channel names \"01\" \"02\" etc.")
|
||||||
|
.takes_value(false)
|
||||||
|
)
|
||||||
|
.arg(Arg::with_name("channel_delimiter")
|
||||||
|
.long("delim")
|
||||||
|
.short("d")
|
||||||
|
.help("Channel label delimiter.")
|
||||||
|
.default_value(".")
|
||||||
|
)
|
||||||
|
.arg(Arg::with_name("INPUT")
|
||||||
|
.help("Input wave file")
|
||||||
|
.required(true)
|
||||||
|
)
|
||||||
|
.get_matches();
|
||||||
|
|
||||||
|
println!("Command line opts: {:?}", matches);
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user