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

module suggestion: ActivityWatch #64

Open
alexriabtsev opened this issue Jul 11, 2020 · 5 comments
Open

module suggestion: ActivityWatch #64

alexriabtsev opened this issue Jul 11, 2020 · 5 comments
Labels

Comments

@alexriabtsev
Copy link

Is there any way to import ActivityWatch info?
They have API with docs - https://docs.activitywatch.net/en/latest/rest.html

@seanbreckenridge
Copy link
Contributor

seanbreckenridge commented Sep 18, 2020

I've played around with this a bit, and the docs don't really document everything that well (seems they've been in the process of migrating to rust-based core as well). had to go and poke in here, and couldn't get the delete route to work after fiddling with it for a bit. However, I was able to get event data from it, so that wouldn't be a limiting factor, at least for now.

I'm not sure how this would work with multiple buckets/generic events either. The window watcher/afk modules are standard, but how would one support loading in arbitrary data buckets?

As it says there:

The API is currently under development, and is subject to change. It will be documented in better detail when first version has been frozen.

I really did like aw-window-watcher though, so I ended up forking that to log to a CSV file instead, and have a data loader for that in my.window_watcher

Generally curious if you're using ActivityWatcher for anything else, is there some data you'd want to expose through the API?

@karlicoss karlicoss changed the title ActivityWatch module? module suggestion: ActivityWatch Feb 18, 2021
@karlicoss karlicoss added bug Something isn't working module and removed bug Something isn't working labels Feb 18, 2021
@madelinecameron
Copy link

👋 I wrote a basic interface for ActivityWatch.

My extractor & DAL code is here: https://github.com/hpi/activitywatch

My synchronization code is https://github.com/hpi/aw-sync-client and https://github.com/hpi/aw-sync-server

It works alright from what I've seen but there could still be fiddling needed. The way I accomplished this is using the query endpoints then synchronizing to an off-site server (not at all required tbh, I should modify the extractor to call directly), then my extractor (currently) calls out to my external AW sync server.

I did this so I can run AW on my personal Linux & WIndows along with any work computers.

@krillin666
Copy link

wave I wrote a basic interface for ActivityWatch.

My extractor & DAL code is here: hpi/activitywatch

My synchronization code is hpi/aw-sync-client and hpi/aw-sync-server

It works alright from what I've seen but there could still be fiddling needed. The way I accomplished this is using the query endpoints then synchronizing to an off-site server (not at all required tbh, I should modify the extractor to call directly), then my extractor (currently) calls out to my external AW sync server.

I did this so I can run AW on my personal Linux & WIndows along with any work computers.

Couldn't this be merged to HPI ?

@seanbreckenridge
Copy link
Contributor

seanbreckenridge commented Apr 29, 2022

It could be, but it doesnt have to be for you to use it -- if you have the client/server setup and you have this installed as editable, you can do something like what I describe here:

git clone 'https://github.com/madelinecameron/hpi' ./HPI-madeline
pip install -e ./HPI-madeline
hpi module install my.activitywatch

hpi doctor -S my.activitywatch

you can then import my.activitywatch as normal, as if it was merged into this repo (because it sort of is, HPI is a namespace package and namespace packages merge multiple folder structures into one module)

@seanbreckenridge
Copy link
Contributor

seanbreckenridge commented Dec 25, 2022

Since Ive started using activitywatch on my android and windows machines, I also published a basic library to parse the JSON dump from activitywatch here, with the corresponding HPI file in my modules (see here for install instructions)

This only does the window titles/app names in particular with timestamps/durations, since thats what Ive always been interested in from activitywatch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants