https://github.com/activitywatch/aw-import-screentime
Import data from Apple's Screen Time on macOS and iOS to ActivityWatch
https://github.com/activitywatch/aw-import-screentime
Last synced: about 1 year ago
JSON representation
Import data from Apple's Screen Time on macOS and iOS to ActivityWatch
- Host: GitHub
- URL: https://github.com/activitywatch/aw-import-screentime
- Owner: ActivityWatch
- Created: 2021-04-13T08:12:46.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2023-02-24T20:14:28.000Z (over 3 years ago)
- Last Synced: 2025-04-13T10:44:14.206Z (about 1 year ago)
- Language: Python
- Size: 35.2 KB
- Stars: 37
- Watchers: 2
- Forks: 3
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
aw-import-screentime
====================
**NOTE:** This is a work in progress.
Import data from Apple's Screen Time to ActivityWatch. This could potentially be used to retrieve the Screen Time data of both macOS and iOS devices.
Based on analysis of the `Knowledge.db` file done here: https://www.r-bloggers.com/2019/10/spelunking-macos-screentime-app-usage-with-r/
## Usage
Requirements:
- Python 3.7+
- Poetry
Install dependencies with: `poetry install`
Run script with: `poetry run python3 main.py`
## Limitations of Knowledge.db
- macOS doesn't keep track of which apps are active and which are inactive (only that they run, or at least have an open window?)
- It almost seems like sometimes it does and sometimes it doesn't, weird.
- Is it different for iOS?
- How far back does the history go?
- On my VM it goes to 2020-02-01 (~2.5mo back), but I've definitely used the machine before that.
- How often does the db file update?
- I can't seem to retrieve the latest entries, maybe they are stuck in WAL?