diff options
| author | Daniel <kingdread@gmx.de> | 2020-04-21 15:04:53 +0200 | 
|---|---|---|
| committer | Daniel <kingdread@gmx.de> | 2020-04-21 15:04:53 +0200 | 
| commit | efbc3fb2131b8c69a88e0622ad4b120c2c48ed85 (patch) | |
| tree | 5ac8f68dbc752f898abc794085e4d4af35a777ba | |
| parent | ab909d2f3a0a59ae1b9a169ec79d4e9ffeddd1e1 (diff) | |
| download | raidgrep-efbc3fb2131b8c69a88e0622ad4b120c2c48ed85.tar.gz raidgrep-efbc3fb2131b8c69a88e0622ad4b120c2c48ed85.tar.bz2 raidgrep-efbc3fb2131b8c69a88e0622ad4b120c2c48ed85.zip | |
add predicate documentation to the help text
Sadly, structopt always displays this, despite the documentation stating
that it should be hidden when the user uses -h (instead of --help). It
seems like this is a bug in clap, which might get fixed with clap 3.0.
| -rw-r--r-- | src/main.rs | 33 | 
1 files changed, 29 insertions, 4 deletions
| diff --git a/src/main.rs b/src/main.rs index b6633ac..ab66848 100644 --- a/src/main.rs +++ b/src/main.rs @@ -34,10 +34,29 @@ macro_rules! unwrap {      };  } -/// A program that allows you to search through all your evtc logs for specific -/// people. +/// A program that allows you to search through all your evtc logs for specific people. +/// +/// raidgrep supports different predicates that determine whether a log is included or not. +/// Predicates start with a - and optionally take an argument. Predicates can be combined with +/// "and", "or" and "not", and predicates that operate on single players (instead of logs) have to +/// be within an "all(player: ...)" or "any(player: ...)" construct. +/// +/// PREDICATES: +/// +///     -character REGEX	True if the character name matches the regex. +///     -account REGEX  	True if the account name matches the regex. +///     -name REGEX     	True if either character or account name match. +/// +///     -success        	Only include successful logs. +///     -wipe           	Only include failed logs. +///     -outcome OUTCOMES	Only include logs with the given outcomes. +///     -weekday WEEKDAYS	Only include logs from the given weekdays. +///     -before DATE    	Only include logs from before the given date. +///     -after DATE     	Only include logs from after the given date. +///     -boss BOSSES    	Only include logs from the given bosses. +///     -player REGEX   	Shorthand to check if any player in the log has the given name.  #[derive(StructOpt, Debug)] -#[structopt(name = "raidgrep")] +#[structopt(verbatim_doc_comment)]  pub struct Opt {      /// Path to the folder with logs.      #[structopt(short = "d", long = "dir", default_value = ".", parse(from_os_str))] @@ -56,14 +75,20 @@ pub struct Opt {      debug: bool,      /// Load guild information from the API. +    /// +    /// Loading guild information requires network access and slows down the program considerably, +    /// so this is disabled by default.      #[structopt(long = "guilds")]      guilds: bool,      /// Run the REPL. +    /// +    /// The REPL will allow you to keep entering queries which are being searched by raidgrep, +    /// until you manually exit with Crtl+C.      #[structopt(long)]      repl: bool, -    /// The filter expression. +    /// The filter expression, see PREDICATES for more information.      expression: Vec<String>,  } | 
