aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2020-05-03slight formatting fix in manualDaniel
If we use +, then the -- is turned into – instead of staying like this. That is not what we want.
2020-05-01only cancel current search on Ctrl-CDaniel Schadt
This is not yet perfect, as it seems to still execute all queued threads just to immediately exit them, so maybe we should try and see if we can "clear" the rayon queue. But it's a good start, and the ctrlc crate seems to work well for this job.
2020-05-01write a manual for raidgrepDaniel
This is the first version of a raidgrep manpage. It is written in asciidoc and can be converted to a Linux manpage by using a2x -f manpage raidgrep.1.asciidoc This will produce a file called raidgrep.1, which is the manpage: man -l raidgrep.1 Alternatively, you can also generate a nice HTML page, suitable for online-hosting or non-Linux-systems: asciidoc raidgrep.1.asciidoc will produce raidgrep.1.html.
2020-05-01improve requoting heuristicDaniel
First of all, this allows : to be part of a word. This has been added because the account names start with a colon, so -player :Dunje should work. Furthermore, the re-quoting now also quotes strings that contain a .+*, as those are characters usually used in regular expressions. A command line like raidgrep -- -player "G.dric" should work, so we either have to re-quote words with a dot, or allow the dot to be part of a (lexical) word as well. For now, we're re-quoting it, but if it turns out to be too troublesome, we might change that.
2020-05-01output filename as (lossy) string, not using DebugDaniel
This has the benefit that it removes the quotes, and it works better on Windows, where double slashes were used.
2020-05-01enable date parsing from filenamesDaniel
This allows the date-based filters to work much faster.
2020-05-01change LogFilter to take EarlyLogResultDaniel
This allows us to attach some additional metadata that is not found in the PartialEvtc otherwise, such as the file name.
2020-05-01use log end timestamp instead of startDaniel
They are usually within minutes of each other, but this has two advantages: 1. The output is consistent with the filename (and probably the file creation date, if it has been preserved) 2. Due to 1., this means we can use the filename to get the timestamp faster than parsing the file.
2020-05-01fix timestamp handlingDaniel
As it turns out, the "local timestamp" as advertised by arcdps is a bit misleading, because the timestamp is still in UTC. The "local" refers to the fact that it can lag behind the server timestamp a bit (but usually they seem to be within +-1 of each other), not that the timestamp is in the local timezone. This makes date handling a bit harder for raidgrep, but thanks to chrono, not by much. The idea is that we simply deal with Utc pretty much everywhere, except at the user boundary. This means that 1. Input timestamps for -before and -after are converted to Utc right after input 2. When outputting, we convert to a local timestamp first This makes the output consistent with the filenames now (and the "wall time" that the player saw).
2020-04-29bump version to 1.0.2v1.0.2Daniel
2020-04-29update locked dependenciesDaniel
2020-04-29update changelogDaniel
2020-04-29fix BossFilter::filter_earlyDaniel
If the boss is unknown, we exclude the log - that is how BossFilter::filter operates, and it is probably what the user wants if they specify a -boss filter. However, in filter_early, the default for unknown bosses was to return Inclusion::Include, which is not consistent with filter. That lead to some logs being included, parsed and then thrown away again. This change makes the behaviour for unknown bosses between filter_early and filter consistent, and therefore speeds up the search if -boss is used.
2020-04-29add more help text about the boss namesDaniel
Everybody calls bosses by different names (Soulless Horror vs Desmina, Super Kodan Brothers, ...), so it might be good to have a list ready in the help message. Other names can still be used, but those are the end-user documented ones now.
2020-04-29allow quoted strings as boss namesDaniel
With evtclib 0.2, every boss has at least one name without space, so every boss can be used. Still, for completeness's and consistency's sake, we want to allow users to also specify boss names with spaces in them. For example, if we print "Qadim the Peerless" as the name of the boss, we might expect raidgrep -- -boss "Qadim the Peerless" to work (instead of -boss qadimp). Therefore, we now allow boss names to be quoted, so that we can properly persist the whitespace.
2020-04-29update evtclib to 0.2.0Daniel
2020-04-26bump version to 1.0.1v1.0.1Daniel
2020-04-26build release with ltoDaniel
This does increase the build times, but it makes sure the binaries are a bit smaller (especially a gain for the Windows binary). In addition, it removes librt, which is unneeded and gave warnings in namcap.
2020-04-26update raidgrep version in Cargo.lockv1.0.0Daniel
2020-04-26remove license-fileDaniel
We already have license set, so no need for license-file.
2020-04-26update evtclib subrepositoryDaniel
2020-04-26more package metadataDaniel
2020-04-26add a CHANGELOGDaniel
2020-04-26update locked dependenciesDaniel
2020-04-26add itertools dependencyDaniel
2020-04-26Merge branch 'new-filters'Daniel
The new filter system (includes both the internal rewrite and the command line parsing) is now being included in master. This gives a lot more flexibility.
2020-04-25add -include and -excludeDaniel
2020-04-25use free functions instead of Filter::newDaniel
Having a ::new on each of the filter types was a bit weird, especially because we returned Box<dyn ...> instead of Self (and clippy rightfully complained). With this patch, we now have a bunch of normal functions, and we don't show to the outside how a filter is actually implemented (or what struct is behind it).
2020-04-25only try regex if word doesn't start with -Daniel
Since our predicates start with -, this sounds like a good heuristic to prevent something like "raidgrep -- -player" from silently succeeding but not doing what the user had intended. In this case, we want the parse error to show and not treat "-player" as a regex.
2020-04-25cosmetic fixesDaniel
2020-04-25better CLI args/parser integrationDaniel
First, this commit adds a shortcut if only a single argument is given that can be parsed as a regex. This is to retain the old behaviour of "raidgrep NAME" just working, without needing to specify -player or anything. Secondly, this also re-wraps arguments with spaces (unless there's only one argument in total). This means that the following should work: raidgrep -- -player "Godric Gobbledygook" instead of either raidgrep -- '-player "Godric Gobbledygook"' raidgrep -- -player '"Godric Gobbledygook"' (notice the extra quotes).
2020-04-21remove unused importsDaniel
2020-04-21add predicate documentation to the help textDaniel
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.
2020-04-21use readline/rustyline instead of stdin.read_lineDaniel
This gives us a history, nicer editing capabilities and the possibility to add completion in the future.
2020-04-21add a small replDaniel
2020-04-21grammar: fix precendence rulesDaniel
If we don't allow the higher-tier on the left side, we cannot chain multiple or/and on the same level. Since or is associative, we shouldn't expect the user to write (... or (... or ...)) and instead provide the flattened version as well.
2020-04-21add "or" and "and" to the list of tokensDaniel
Otherwise they'd get tokenized as word and we couldn't build conjunctions/disjunctions.
2020-04-21better error outputsDaniel
2020-04-20hook up new expression parser to command line argsDaniel
This method is not perfect yet, because 1. The items are not documented as they were before 2. You need to separate the args with --, otherwise Clap tries to parse them as optional flags This should be fixed (especially the documentation part) before merging into master.
2020-04-20Add -player as a shortcut to search player namesDaniel
2020-04-18first version of the new filter pipelineDaniel
2020-04-18make filters DebugDaniel
It's nice if you can print out the filter tree for debugging, so we're requireing filters to be Debug now.
2020-04-17add missing num-derive dependencyDaniel
2020-04-17split off player filters and log filtersDaniel
As it turns out, we can easily re-use the existing Filter machinery to generalize over LogFilters (which operate on LogResults) and PlayerFilters (which operate on Players). The feature trait_aliases is not strictly needed but makes the function signatures a bit nicer and easier to read, and it reduces the chances of an error (e.g. by using Filter<&PartialEvtc, ...>).
2020-04-15formatting fixesDaniel
2020-04-15new filter pipelineDaniel
This is the groundwork for introducing more complex filter queries like `find` has. Filters can be arbitrarily combined with and/or/not and support an "early filter" mode. So far, the filters have been translated pretty mechanically to match the current command line arguments, so now new syntax has been introduced. The NameFilter is not yet in its final version. The goal is to support something like PlayerAll/PlayerExists and have a PlayerFilter that works on single players instead of the complete log, but that might introduce some code duplication as we then need a PlayerFilterAnd, PlayerFilterOr, ... Some digging has to be done into whether we can reduce that duplication without devolving into madness or resorting to macros. Maybe some type-level generic hackery could be done? Maybe an enum instead of dynamic traits should be used, at least for the base functions?
2020-04-10pipeline: accept boxed trait objectsDaniel
It's kinda silly to have new() be generic when all it does is box the objects anyway. It only makes code harder to write, as we cannot unify the types to call Pipeline::new(), and instead we have to rely on calling Pipeline::new() in the branches themselves. It's not the biggest issue when we only have different formats, but at some point we might want to add different aggregators as well (like a sorting one or a counting one), so it would be bad if we suddenly had to add all those branches. This fix changes that, and we can build the pipeline piecewise by having a Box<dyn Format> around, allowing us to combine it freely with any Box<dyn Aggregator>.
2020-04-09replace match on bool with if/elseDaniel
2020-04-09use log crate instead of own debug! macroDaniel
This also does away with the scary unsafe{} blocks just to set/get the DEBUG flag.
2020-04-09replace unwrap/match with if-letDaniel