promnesia icon indicating copy to clipboard operation
promnesia copied to clipboard

ActivityWatch as module?

Open alexriabtsev opened this issue 3 years ago • 7 comments

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

alexriabtsev avatar Jul 11 '20 21:07 alexriabtsev

Looks like it should be in HIP not in Promnesia

alexriabtsev avatar Jul 11 '20 21:07 alexriabtsev

Hey, yeah, this would be interesting! Trying activitywatch was on my todolist for a while. Doesn't have to be in HPI actually -- I would expect it's very straightforward to get the data directly from ActivityWatch (it runs locally as far as I understand?)! HPI is more of a kludge for services that don't have nice offline API for the data.

karlicoss avatar Jul 11 '20 21:07 karlicoss

yes, it runs locally at localhost:5600

alexriabtsev avatar Jul 11 '20 22:07 alexriabtsev

image it gives info about URL and duration which might be even more interesting for Promnesia

alexriabtsev avatar Jul 11 '20 23:07 alexriabtsev

I found Spotify watcher for ActivityWatch, so we can get info about the music from it too

alexriabtsev avatar Jul 13 '20 09:07 alexriabtsev

Nice! Spotify also has an API: https://developer.spotify.com/documentation/web-api/reference/personalization/get-users-top-artists-and-tracks , which might be a bit more straightforward to get data from. Although wouldn't be too surprised if it's too limited. This actually could be a really cool usecase, e.g. imagine if you could correlate the artist page on Wikipedia, their subreddit, and their spotify songs in your library. Totally realistic, but going to require some thinking.

karlicoss avatar Jul 13 '20 21:07 karlicoss

Yes, they have extensive API to work with!

alexriabtsev avatar Jul 14 '20 04:07 alexriabtsev