E.g., a chat in Discord with “Emma” gets categorized as “Comms>IM” but what if I have a rule that marks “Emma” as “Project X” ?
Bumping this to see if there’s a solution. Curious if it gets double counted or not
After reading some code of aw-server-rust, I think the match process is as follows:
- iterate every rule, in the order shown in the web ui
- if one matches, use that one
- if we have multiple matches, use the deepest one. i.e. if an event matches both “Comm” and “Comm>IM”, the category will be “Comm>IM”
So we won’t get double categories for one event. In OP’s case, “Comms>IM” is deeper than “Project X”, so this event will be categorized to “Comms>IM”
Isn’t categorization done at client-side in JS?
I thought so, as just recently it was merged to save settings to DB. Or this code exists only in Rust version?
See this PR:
Rules Link
A rule decides what text will match in an event. If there are multiple categories matching the same event then the deepest sub-category will be chosen.
https://docs.activitywatch.net/en/latest/features/categorization.html
Currently there are only two rule options for categories: “Regex” or “No rule”.