Age | Commit message (Collapse) | Author |
|
|
|
|
|
|
|
|
|
|
|
|
|
We changed the descending prefix to be ~ earlier, so now we need to
adjust the tests as well.
|
|
|
|
Since - leads to structopt interpreting the component as the start of
another argument, we need to use a different one.
|
|
|
|
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.
|
|
With the addition of our own parser, we no longer need the FromStr
implementation for SearchField. Furthermore, it is now only used in
player::NameFilter, so the definition has been moved there. The import
in the grammar was unused as well, so it has been removed.
|
|
The easiest way to get this consistent is to implement PartialOrd & Ord
for Player. However, the implementation might not be 100% sound, as it
should be using the same fields as (Partial)Eq, but that would mean
either
1. Deriving PartialOrd/Ord, which is not possible because PlayerClass
does not implement it (which in turn would not make sense to order)
or
2. Implementing (Partial)Eq by hand instead of deriving it, which is not
the best either
I don't think it's an issue though, as we never put Players in any
position where it might get relevant (such as a HashMap/BTreeMap), and
we're only using it to sort them for the output.
|
|
|
|
|
|
Most users probably don't need the capitalization, and character names
always have a predefined capitalization anyway.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
This causes issues with the player: prefix used in any() and all()
constructs, as player: will now be parsed as a word instead of the
proper token. For now, : is disallowed in words again until there is a
better solution.
|
|
Away with stringly typed stuff, we now have a proper way to save the
profession of a player without relying on a string. Theoretically, that
is better for memory consumption, as we now save only the identifier and
use fmt::Display and static strings, but that was not the main reason
for this change.
The main reason is that now we can programatically work with the
profession and elite spec, so that we can (for example) implement a
filter to filter players based on their class.
The word "class" has been chosen because it is a common synonym for the
profession/elite, and because this is neither a profession nor the elite
- it's a combination of both.
|
|
|
|
Rust doesn't necessarily need this, but it's good formatting to include
it anyway.
|
|
With the file name heuristic for -before and -after in place, we might
want a way for the user to disable it. For now, we simply do this by
providing a new set of predicates without the filter.
In the future, we might have a --disable-heuristics switch to disable
the heuristics, in case we ever add more.
|
|
|
|
|
|
This avoids unwrapping (and therefore panicing) when the path doens't
have a parent. It also avoids the explicit Into::into() calls.
|
|
|
|
|
|
This persists the REPL history across program restarts.
The code should probably be cleaned up a bit more, the error handling in
this one is a bit all over the place. This is because we don't want to
make it a hard error in case the history cannot be saved.
|
|
Since we now also have a manpage to distribute, simply having the
executable file on its own is no longer really a viable distribution
option for binary builds.
This script makes sure that a .tar.gz archive is built, which not only
reduces the space and bandwidth needed, but also allows us to include
the manpage/HTML help.
|
|
Even though there are not a lot of tests currently, it's good to get
started and at least get the basic compilation/clippy errors as well.
|
|
|
|
|
|
With evtclib being on crates.io now (and generally, being available
publicly through git), there is no longer a need to have a copy of the
evtclib repository in this repository. The main reason was that evtclib
was private when I started it, so the easiest way to include it was
through a git submodule. That reason is no longer valid.
If we really *need* to use the git version, it is also better to just
point Cargo to the repository and let it deal with keeping the
repository up-to-date, rather than using git submodules.
This commit also updates Cargo.lock, so there is a bit of noise from
also adding ctrlc as a dependency.
|
|
If we use +, then the -- is turned into – instead of staying like this.
That is not what we want.
|
|
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.
|
|
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.
|
|
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.
|
|
This has the benefit that it removes the quotes, and it works better on
Windows, where double slashes were used.
|
|
This allows the date-based filters to work much faster.
|
|
This allows us to attach some additional metadata that is not found in
the PartialEvtc otherwise, such as the file name.
|
|
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.
|
|
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).
|
|
|
|
|