Merging events from aw-server DB into aw-server-rust

When I first installed ActivityWatch on this system (Mac 12.6.7), I accidentally left out the configuration file editing to set aw-server-rust on startup, so I have a weird mix of time recorded across two different DBs (since it would start the wrong server on infrequent reboots, then usually I would catch this at some point and switch them using the menu bar icon). This shows up in different totals across the same interval, neither of which has enough time to cover everything. Now that I’ve figured out the problem, how can I pull everything into the same database?

Looks like a bucket-merging script was added earlier this year to handle this and other issues.

I’m not much of a Python programmer (I can read it, I just don’t normally use it for anything). I just want to run the script, but there are various dependencies it needs and they aren’t specified.

Well, actually, I want to merge buckets that came from inconsistent hostnames. I don’t actually want to run a Python script, much less fiddle with poetry, pip, virtualenv, half a dozen lock files and a Superfund site. But it looks like for now the script is the only way to do it.

Unfortunately, cloning the repo and running poetry install in the root was insufficient to get the script to run. It still shows ModuleNotFoundError: No module named 'aw_client'.

Oh, OK, a little extra elbow grease shows that I was running with python3 instead of python3.9, and pip (and therefore poetry) was installed with python3.9, and didn’t share its installed modules with 3.10. That makes perfect sense! :roll_eyes:

Then all I had to do was read the source when I got a connection error, find the parameter to change, flip it, and everything is golden.