Skip to content

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

@wsdookadr

Description

@wsdookadr

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}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions