From 9bbd5db2a6caae10f0ab2cf2625fbc34485a4ce9 Mon Sep 17 00:00:00 2001 From: Daniel Date: Sat, 25 Apr 2020 13:22:00 +0200 Subject: add -include and -exclude --- src/fexpr/grammar.lalrpop | 3 +++ src/main.rs | 2 ++ 2 files changed, 5 insertions(+) diff --git a/src/fexpr/grammar.lalrpop b/src/fexpr/grammar.lalrpop index d8f64fa..58ec052 100644 --- a/src/fexpr/grammar.lalrpop +++ b/src/fexpr/grammar.lalrpop @@ -54,6 +54,9 @@ LogPredicate: Box = { "-boss" > => filters::log::boss(<>), + "-include" => filters::constant(true), + "-exclude" => filters::constant(false), + "-player" => filters::player::any( filters::player::character(<>.clone()) | filters::player::account(<>) diff --git a/src/main.rs b/src/main.rs index 50dcf8d..231fbdc 100644 --- a/src/main.rs +++ b/src/main.rs @@ -57,6 +57,8 @@ macro_rules! unwrap { /// -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. +/// -include Always evaluates to including the log. +/// -exclude Always evaluates to excluding the log. #[derive(StructOpt, Debug)] #[structopt(verbatim_doc_comment)] pub struct Opt { -- cgit v1.2.3