diff options
| author | Timotej Lazar <timotej.lazar@araneo.si> | 2021-09-16 21:40:24 +0200 |
|---|---|---|
| committer | Timotej Lazar <timotej.lazar@araneo.si> | 2021-09-16 21:40:24 +0200 |
| commit | ca524131a5ae0cc61f8a307f6e4ba130d498a457 (patch) | |
| tree | 46e9025f4d777257bf5c3e36e33e06a57f76393e | |
| parent | 9cf9cfdb175ed8cc069de87698b2574ae129771f (diff) | |
README: describe filter syntax
| -rw-r--r-- | README.md | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -10,7 +10,15 @@ Open a video. Press `space` to start or stop video playback. Seek with `←` and To add a new event, press the key for the corresponding tag and fill out event details. Custom tags can be defined as a JSON array and loaded at runtime. See `tags.json` for the built‐in example showcasing all supported field types. -Events for `video.mp4` are saved in JSON format in the file `video.mp4.events`. Saved file includes tag definitions, which are loaded automatically when the file is opened. Event timestamps are stored with millisecond precision. +Events for `video.mp4` are saved in JSON format to the file `video.mp4.events`. The saved file includes tag definitions, which are loaded automatically when the video is opened. Event timestamps are stored with millisecond precision. + +### Filter + +Input space‐separated search strings to select a subset of events. Selected events must match each string, either as the tag name or a field value. Tags are matched from the beginning, so `p` will select events tagged `pass` and `penalty`. + +Text and enum fields match when they contain the given search string. Prefixing the string with `=` specifies a complete match. The string `2` thus matches values `123`, `2` and `22`, while `=2` only matches `2`. A boolean field matches when it’s value is true and it’s name starts with the search string. Prefixing the string with `!` inverts the match. + +Finally, a search string can be prefixed with a (prefix of) field name, as in `play:2`. This selects events with a field named `player` whose value matches `2` as above. This can be combined with the `!` and `=` operators, as in `pass:!success`. ## Compiling |
