aboutsummaryrefslogtreecommitdiff
path: root/src/output
AgeCommit message (Collapse)Author
2021-11-12Better error handling, less .unwraps()Daniel
Some of these unwraps are fine to stay, mostly those that deal with locks - in this case, crashing the program if something goes wrong is probably fine. However, we also had a lot of other places where we panic'd on errors, even though we really shouldn't have. For example, an invalid zip file would bring down the whole scanner. In this case, we now use proper Result<>s and we log the error. Some places stay with unwrap() for now, mainly the code that is rare and obvious when it goes wrong - such as an overflow in input values. It could be made nicer, but it is not a priority for now. Some unwraps() have been changed to expect() to signal why they shouldn't fail.
2021-11-12Minor code smell fixesDaniel
2020-10-10fix testsv1.3.1Daniel
2020-10-10fix lintsDaniel
2020-10-04update to newest evtclibDaniel
There's a good chance that this will be evtclib 0.5, so we want to adapt our API usage (mainly replacing evtclib::Boss with evtclib::Encounter). The naming is a bit all over the place now, as we sometimes refer to bosses and sometimes to encounters, but I hope to make a sensible decision at *some point* about what we're actually doing here.
2020-08-28add --count/-n flagDaniel
2020-06-26implement sorting based on durationDaniel Schadt
2020-06-12include fight duration in outputDaniel
Since we have this information now anyway, might as well include it. We're using humantime here, as that produces the expected "xxm yys zzms" output. The conversion shouldn't fail (the unwrap), as we should never encounter negative fight durations.
2020-06-12fix tests for sortingDaniel
2020-05-14add a small test for sorting with SortingDaniel
2020-05-14fix testsDaniel
We changed the descending prefix to be ~ earlier, so now we need to adjust the tests as well.
2020-05-13fix formattingDaniel
2020-05-13change sorting reversing prefix to ~Daniel
Since - leads to structopt interpreting the component as the start of another argument, we need to use a different one.
2020-05-13fix Aggregator::finish for trait objectsDaniel
2020-05-13first attempt at sorting outputDaniel
This does currently not work yet, as we cannot call .finish() on dyn Aggregator. This needs to be adjusted. However, this provides the basic infrastructure for producing sorted output, including the required command line parsing.
2020-05-12fix formattingDaniel
2020-05-12use Display implementations from evtclibDaniel
2020-05-12display if a fight had CM activatedDaniel
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-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-15formatting fixesDaniel
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-06implement guild display & filtering optionsDaniel
Filtering based on guilds is slow, as it will have to retrieve every guild name from the GW2 API, and it has to parse every log file instead of bailing early. Therefore, guilds are not searched by default, and have to be explicitely turned on with --guilds. In addition, this means that raidgrep will now need network access when --guilds is passed, which was not the case before.
2020-04-06properly add newline after filenamesDaniel
2020-04-04make pipeline workingDaniel
2019-06-03[WIP] rewrite output logic as a pipelineDaniel