ActivityWatch / activitywatch

The best free and open-source automated time tracker. Cross-platform, extensible, privacy-focused.

Home Page:https://activitywatch.net/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Import/export buckets

ErikBjare opened this issue · comments

The only export we have now is for all the events in a bucket. None of the metadata needed to actually import the bucket is present in the current export.

I therefore propose a new export/import format on the form:

{
  "id": str,
  "hostname": str,
  "<other bucket metadata>": Any,
  "observing": str  # Idea for a new type of bucket metadata that could be: 
                    #  - "firefox" or "chrome" (for browser watcher)
                    #  - "macos", "windows", "xorg" or "wayland" (for window watcher)
  "events": List[Event]
}

Here is a arguably cleaner alternative that makes the export more like a pairing, which I like:

{
  "bucket": {
    "id": str,
    "hostname": str,
    "<other bucket metadata>": Any,
    "observing": str  # Idea for a new type of bucket metadata that could be: 
                      #  - "firefox" or "chrome" (for browser watcher)
                      #  - "macos", "windows", "xorg" or "wayland" (for window watcher)
  },
  "events": List[Event]
}

An alternative to the observing key would be to use namespaces (See issue #97)

  • Encode the schema as a JSONSchema
  • Do extensive testing

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

Started working on export here: ActivityWatch/aw-server#34

commented

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.

The main things in this issue have been completed. Closing.