Hello, thanks for this program. I think it has great potential It is the only suitable one that I’ve found for tracking what I do at work because it’s portable and doesn’t require administrator access. I have no idea about programming or how to make queries and program, but one feature that I would love to have is the ability to export all the data in the “Window” tab to an Excel spreadsheet so that I can filter and sort it to get the information I need. I tried exporting as a JSON file, but I wasn’t able to view any data on Excel.
Excel represents a speadsheet which is essentially just columns and rows, JSON which we use is much more expressive as a field can contain multiple fields which does not translate well into spreadsheets. So there’s no way to make a universal way to export activitywatch events into a spreadsheet/csv format.
You could however make a seperate program which only works for aw-watcher-window type of events, maybe simply with a JSON to CSV converter which you can easily find online.
An example of this would be to go to the “Query” tab in the web-ui, insert this query:
afk_events = query_bucket(find_bucket('aw-watcher-afk_')); window_events = query_bucket(find_bucket('aw-watcher-window_')); RETURN = filter_period_intersect(window_events, filter_keyvals(afk_events, 'status', ['not-afk']));
Then press the “Raw JSON” visualizer, copy it and then paste it into for example this website http://convertcsv.com/json-to-csv.htm