ActivityWatch / activitywatch

The best free and open-source automated time tracker. Cross-platform, extensible, privacy-focused.
https://activitywatch.net/
Mozilla Public License 2.0
12.39k stars 557 forks source link

Categorization ignoring certain URLs(from aw-webwatcher) but not others #559

Closed rcarmelitano closed 3 years ago

rcarmelitano commented 3 years ago

The categorization system does not file discord.com usage under the IM category despite there being a Rule(regex) for "Discord" yet it does file, just for example, youtube.com usage under the video category and that is defined the same way(regex rule for "YouTube"). I cannot see any difference here between the scenarios so I'm not sure why one works and the other doesn't. It results in all discord.com usage being filed under uncategorized. The data for which website is being used and for how long is coming from the aw-webwatcher chrome add on by the way.

aw-server_2021-02-02T00-18-45.log I've just installed activitywatch last night so it is the most recent version as of 2/2/21. The bug can be reproduced by having aw-webwatcher installed and using discord.com for a given length of time then looking at the web dashboard. My apologies if this is user error or if my formatting is not acceptable, I've never reported a bug before.

github-actions[bot] commented 3 years ago

Hi there! As you're new to this repo, please make sure you've used an appropriate issue template and searched for duplicates (it helps us focus on actual development!). We'd also like to suggest that you read our contribution guidelines and our code of conduct. Thanks a bunch for opening your first issue! 🙏

watertrainer commented 3 years ago

This is a known bug. Activitywatch currently only uses the window-title for categorization. he url is not used yet (although it is saved and might be used in the future). E.g. if you are on youtube and check the title of the tab, thats the text which is compared to your regex. TOn youtube this tab-title contains "Youtube", but on discord the tab title is the name of the current chat which is opened, so the regex "Discord" won't detect it (If you are in the "Friends" tab of discord, however, it has "Discord" as tab title and gets categorized correctly. Here is the issue which discusses this further.

johan-bjareholt commented 3 years ago

I'll close this issue. If someone need to add anything to it, please do it on the issue that @watertrainer linked.

AustEcon commented 1 year ago

Are there plans to include the "url" field in the regex classification process? It's important to capture when chrome.exe is on github.com which should be classified as "productive time" whereas twitter.com should be classified as "unproductive time"...