Skip to content

Instantly share code, notes, and snippets.

@ShadowNinja
Last active January 29, 2017 18:42
Show Gist options
  • Save ShadowNinja/11b5d35988dddd090596ad17e6e2c882 to your computer and use it in GitHub Desktop.
Save ShadowNinja/11b5d35988dddd090596ad17e6e2c882 to your computer and use it in GitHub Desktop.
#[macro_use] extern crate clap;
fn main() {
clap_app!( myapp =>
(@group output =>
(@attributes +multiple +required)
(@arg out: -o --out <PATH> requires("media_transfer")
"Directory to output media files and index. \
If --index is passed the index be written there instead of here.")
(@arg index: --index <PATH> "Path to the index file to output."))
(@group media_transfer =>
(@arg copy: -c --copy requires("out") "Copy media files to output folder.")
(@arg hardlink: -l --hardlink requires("out") "Hardlink media files to output folder."))
).get_matches();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment