diff options
Diffstat (limited to 'src/main.rs')
-rw-r--r-- | src/main.rs | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/main.rs b/src/main.rs index 87ebbb0..89dab09 100644 --- a/src/main.rs +++ b/src/main.rs @@ -123,6 +123,14 @@ pub struct Opt { )] weekdays: CommaSeparatedList<Weekday>, + /// Only show logs from the given encounters. + #[structopt( + short = "e", + long = "bosses", + default_value = "*", + )] + bosses: CommaSeparatedList<evtclib::statistics::gamedata::Boss>, + /// Print more debugging information to stderr. #[structopt(long = "debug")] debug: bool, @@ -317,7 +325,10 @@ fn search_log(entry: &DirEntry, opt: &Opt) -> Result<Option<LogResult>, RuntimeE let mut stream = wrapper.get_stream(); let partial = evtclib::raw::parser::parse_partial_file(&mut stream)?; - if filters::filter_name(&partial, opt) == opt.invert { + let early_ok = filters::filter_name(&partial, opt) != opt.invert + && filters::filter_boss(&partial, opt); + + if !early_ok { return Ok(None) } |