README: describe filter syntax

This commit is contained in:
Timotej Lazar 2021-09-16 21:40:24 +02:00
parent 9cf9cfdb17
commit ca524131a5
No known key found for this signature in database
GPG key ID: B6F38793D143456F

View file

@ -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 builtin example showcasing all supported field types. 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 builtin 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 spaceseparated 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 its value is true and its 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 ## Compiling