ActivityWatch / ActivityWatch/aw-server

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

Aberta
#85 0 comentários 1 reação 0 responsáveis Ver no GitHub
Linguagem predominante
Python
Estrelas
128
Forks
94
Merge médio
4d 18h
PRs com merge (30d)
3

Descrição

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}
```

Guia de contribuição

Nenhum guia de contribuição indexado para este repositório

Avaliação

Esta issue ainda não foi avaliada.

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.