Skip to content

Using a watcher to send data to Google Drive (or another service) #727

Description

@kovasap

A while ago I made https://github.com/kovasap/aw-watcher-google-drive to watch some directories in my Google Drive and import data from them into the activitywatch database. Now I'm interested in doing the opposite: pushing data from the activitywatch db to files in my Google Drive. Naively, it seems like this should be doable - if I just query the activitywatch db in the watcher and use "upload" calls instead of "download" calls, it seems like this would solve my problem.

Before I go ahead and do this, I want to double check that there isn't something I'm missing that would make this impossible. I also want to make sure that this kind of solution would be portable across different platforms. I have a linux, windows, and android device that I want to use. I don't care if three separate database files end up in my Google Drive (actually, that's preferable to having a single merged file).

  • I have searched the issues of this repo and believe that this is not a duplicate.
  • I have searched the documentation and believe that my question is not covered.

Activity

  1. ErikBjare commented on Apr 9, 2022

    @ErikBjare
    Member

    Sounds quite similar to what I'm working on for aw-sync: https://github.com/ActivityWatch/aw-server-rust/pull/257/files

    Also described in the docs: https://docs.activitywatch.net/en/latest/features/syncing.html

    It syncs some specified buckets into a separate database file (one per device) in a "sync directory" which is then synced with Dropbox/Gdrive/Syncthing/rsync/whatever.

    Otherwise, I see no issue with what you are proposing. Should work fine.

  2. kovasap commented on Apr 9, 2022

    @kovasap
    Author

    Yep, i've been following the syncing work for a while (and am looking forward to using it!). This idea is more of a stop-gap, and it allows me to control the file format that ultimately is uploaded. I personally don't currently need to have my synced data openable in a single AW instance - I'm planning to have all the databases be written in a csv format so that another tool can visualize/analyze them.

    One goal I do have is to make this runnable on android, ideally as a part of the main AW release that is downloadable from the play store. I don't have any android development experience, so I'm hoping that the watcher will just work out of the box like it does on other platforms (which might be wishful thinking...). I wouldn't be surprised if there are unknowns here that would actually mean it would be a better idea to simply wait for more progress to be made on your syncing implementation and just use that. Do you have any thoughts on this specifically?

  3. kovasap commented on Apr 9, 2022

    @kovasap
    Author

    Also, if you need help hooking up google drive to the current syncing code, i'm happy to help if you point me in the right direction!

  4. kovasap commented on Apr 12, 2022

    @kovasap
    Author

    Checking in on this issue again. I'm currently fairly motivated to solve this problem, and would prefer to do right in a way that will be generally useful. In this light, is the syncing work to the point where plugging in some Google Drive API calls (if a user enables drive syncing of course) would make sense? If not, is there anything I can do to help get the system to this point?

  5. kovasap commented on Apr 20, 2022

    @kovasap
    Author

    Gentle ping on this issue - if thing's aren't stable enough yet to start messing with Drive integration, I'm curious to know that too.

  6. kovasap commented on Apr 27, 2022

    @kovasap
    Author

    Checking in again :)

  7. ErikBjare commented on Apr 28, 2022

    @ErikBjare
    Member

    I finished most of the syncing MVP yesterday (ActivityWatch/aw-server-rust#257), and wrote some basic docs for it just now: https://github.com/ActivityWatch/aw-server-rust/tree/master/aw-sync#testing-with-real-data-on-a-testing-instance

    Any feedback/ideas welcome! :)

  8. kovasap commented on Apr 28, 2022

    @kovasap
    Author

    Awesome! My devices of interest are a linux laptop, a windows PC, and a android phone - I'll try out your MVP as far as i can make it on those devices.

  9. kovasap commented on Apr 30, 2022

    @kovasap
    Author

    Is there a plan to make a testing release that runs these scripts automatically? It would make testing on various devices easier (as opposed to installing aw from source on each device).

  10. stale commented on May 21, 2023

    @stale

    This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions