Created
March 28, 2022 19:00
-
-
Save gilbertw1/dd89b2ab8f8ebb0a3d17318955640972 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use clap::{Arg, App}; | |
pub fn create_drop_cli_app() -> App<'static,'static> { | |
App::new("drop") | |
.version("0.3.3") | |
.author("Bryan G. <[email protected]>") | |
.about("Screenshot & file upload tool with S3 support - http://github.com/gilbertw1/drop") | |
.arg(Arg::with_name("audio") | |
.short("-a") | |
.long("audio") | |
.help("Enable audio in screencast")) | |
.arg(Arg::with_name("audio-source") | |
.long("audio-source") | |
.value_name("AUDIO_SOURCE") | |
.help("Audio source to use when creating screencast. (desktop only available on Linux)") | |
.takes_value(true) | |
.possible_values(&["mic", "desktop"]) | |
.default_value("mic")) | |
.arg(Arg::with_name("border") | |
.short("-b") | |
.long("border") | |
.help("Display border around screencast area while recording (does not show in video, Linux only)")) | |
.arg(Arg::with_name("aws-bucket") | |
.long("aws-bucket") | |
.value_name("AWS_BUCKET") | |
.help("S3 Bucket to upload to") | |
.takes_value(true)) | |
.arg(Arg::with_name("aws-key") | |
.long("aws-key") | |
.value_name("AWS_KEY") | |
.help("AWS access key") | |
.takes_value(true)) | |
.arg(Arg::with_name("aws-secret") | |
.long("aws-secret") | |
.value_name("AWS_SECRET") | |
.help("AWS access secret") | |
.takes_value(true)) | |
.arg(Arg::with_name("delay") | |
.long("delay") | |
.short("-d") | |
.value_name("SECONDS") | |
.help("Number of seconds to delay screenshot or screencast start.") | |
.takes_value(true) | |
.default_value("0")) | |
.arg(Arg::with_name("extension") | |
.long("extension") | |
.short("-e") | |
.value_name("EXTENSION") | |
.help("Extension to use when creating a filename") | |
.takes_value(true)) | |
.arg(Arg::with_name("file") | |
.value_name("FILE") | |
.help("Optional file to upload. If equal to '-' then drop reads from stdin") | |
.index(1)) | |
.arg(Arg::with_name("filename") | |
.long("filename") | |
.short("-f") | |
.value_name("FILENAME") | |
.help("Filename to use for creating resulting file") | |
.takes_value(true)) | |
.arg(Arg::with_name("filename-strategy") | |
.long("filename-strategy") | |
.value_name("STRATEGY") | |
.help("File upload naming strategy") | |
.possible_values(&["exact", "append", "prepend", "replace"]) | |
.takes_value(true)) | |
.arg(Arg::with_name("host") | |
.long("host") | |
.value_name("HOST") | |
.help("Custom host") | |
.takes_value(true)) | |
.arg(Arg::with_name("local") | |
.long("local") | |
.short("-l") | |
.help("Don't upload file to remote location (produces local file url)")) | |
.arg(Arg::with_name("mouse") | |
.short("-m") | |
.long("mouse") | |
.help("Show mouse cursor in screencast.")) | |
.arg(Arg::with_name("quiet") | |
.long("quiet") | |
.short("-q") | |
.help("Hide desktop notifications")) | |
.arg(Arg::with_name("screenshot") | |
.short("s") | |
.long("screenshot") | |
.help("Capture screenshot")) | |
.arg(Arg::with_name("no-tray-icon") | |
.long("no-tray-icon") | |
.short("-i") | |
.help("Do not display tray icon while recording screencast.")) | |
.arg(Arg::with_name("unique-length") | |
.short("-u") | |
.long("unique-length") | |
.value_name("LENGTH") | |
.help("Length of unique string used to create filenames") | |
.takes_value(true)) | |
.arg(Arg::with_name("transparent") | |
.long("transparent") | |
.short("-t") | |
.help("Enable transparent selection overlay, compositor is required (Linux only)")) | |
.arg(Arg::with_name("verbose") | |
.long("verbose") | |
.help("Enables verbose logging")) | |
.arg(Arg::with_name("video") | |
.short("v") | |
.long("video") | |
.help("Record video screencast")) | |
.arg(Arg::with_name("video-format") | |
.long("video-format") | |
.value_name("FORMAT") | |
.help("Format to record screencast") | |
.possible_values(&["mp4", "gif"]) | |
.default_value("mp4") | |
.takes_value(true)) | |
.arg(Arg::with_name("display-server") | |
.long("display-server") | |
.value_name("DISPLAY_SERVER") | |
.help("Indicates which display server to target (Linux only - Defaults to $XDG_SESSION_TYPE or x11)") | |
.possible_values(&["x11", "wayland"]) | |
.takes_value(true)) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment