Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Search results for Tools > Search or Tools > Query don't include urls #85

Open
wsdookadr opened this issue Oct 21, 2021 · 0 comments
Open

Comments

@wsdookadr
Copy link

wsdookadr commented Oct 21, 2021

Tab urls (collected through aw-watcher-web) do not show up in search results for Tools > Search or Tools > Query (only the app name and app title show up).
Possible cause:

  1. The bucket for aw-watcher-web is not included in the search
  2. Somewhere in aw-core the url is filtered out
  3. Somewhere in aw-server the url is filtered out

I've tried this query with raw json output but the urls are missing. I thought if I include browser_events, the urls would show up.

afk_events = query_bucket(find_bucket("aw-watcher-afk_"));
window_events = query_bucket(find_bucket("aw-watcher-window_"));
browser_events = query_bucket(find_bucket("aw-watcher-web-firefox"));
window_events = filter_period_intersect(window_events, afk_events);
window_events = filter_period_intersect(window_events, browser_events);
merged_events = merge_events_by_keys(window_events, ["app", "title"]);
RETURN = sort_by_duration(merged_events);

Workaround: I can do the queries I need directly on peewee-sqlite.v2.db in the terminal but I thought if the search/query functionality is already present in the UI then I could use it:

awuser@box:/aw/data/activitywatch/aw-server$ sqlite3 peewee-sqlite.v2.db 'select timestamp, datastr from eventmodel;' | sed -e 's/|{/",/ ; s/^/{"time": "/' | grep -i "github" | tail -3
{"time": "2021-10-21 03:16:11.200000+00:00","url": "https://github.com/ActivityWatch/aw-server/issues/85", "title": "Search results for `Tools > Search` or `Tools > Query` don't include urls \u00b7 Issue #85 \u00b7 ActivityWatch/aw-server", "audible": false, "incognito": false, "tabCount": 16}
{"time": "2021-10-21 03:16:12.827000+00:00","url": "https://github.com/ActivityWatch/aw-core/", "title": "ActivityWatch/aw-core: Core library for ActivityWatch", "audible": false, "incognito": false, "tabCount": 16}
{"time": "2021-10-21 03:16:15.641000+00:00","url": "https://github.com/ActivityWatch/aw-server/issues/85", "title": "Search results for `Tools > Search` or `Tools > Query` don't include urls \u00b7 Issue #85 \u00b7 ActivityWatch/aw-server", "audible": false, "incognito": false, "tabCount": 15}
@wsdookadr wsdookadr changed the title The Tools > Search or Tools > Query view filters out urls Search results for Tools > Search or Tools > Query don't include urls Oct 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant