{"id":18875944,"url":"https://github.com/activitywatch/aw-import-screentime","last_synced_at":"2025-04-14T17:31:47.013Z","repository":{"id":52692675,"uuid":"357474788","full_name":"ActivityWatch/aw-import-screentime","owner":"ActivityWatch","description":"Import data from Apple's Screen Time on macOS and iOS to ActivityWatch","archived":false,"fork":false,"pushed_at":"2023-02-24T20:14:28.000Z","size":36,"stargazers_count":37,"open_issues_count":5,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-13T10:44:14.206Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ActivityWatch.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null},"funding":{"github":["ActivityWatch"],"open_collective":"activitywatch","liberapay":"ActivityWatch","custom":["https://activitywatch.net/donate/"]}},"created_at":"2021-04-13T08:12:46.000Z","updated_at":"2025-01-19T11:50:13.000Z","dependencies_parsed_at":"2023-09-23T14:40:42.493Z","dependency_job_id":null,"html_url":"https://github.com/ActivityWatch/aw-import-screentime","commit_stats":{"total_commits":5,"total_committers":3,"mean_commits":"1.6666666666666667","dds":0.4,"last_synced_commit":"df9f8618780e4231aa4545f59df93124b983e415"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ActivityWatch%2Faw-import-screentime","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ActivityWatch%2Faw-import-screentime/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ActivityWatch%2Faw-import-screentime/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ActivityWatch%2Faw-import-screentime/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ActivityWatch","download_url":"https://codeload.github.com/ActivityWatch/aw-import-screentime/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248926552,"owners_count":21184463,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-08T06:09:52.579Z","updated_at":"2025-04-14T17:31:46.769Z","avatar_url":"https://github.com/ActivityWatch.png","language":"Python","funding_links":["https://github.com/sponsors/ActivityWatch","https://opencollective.com/activitywatch","https://liberapay.com/ActivityWatch","https://activitywatch.net/donate/"],"categories":[],"sub_categories":[],"readme":"aw-import-screentime\n====================\n\n**NOTE:** This is a work in progress.\n\nImport 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.\n\nBased on analysis of the `Knowledge.db` file done here: https://www.r-bloggers.com/2019/10/spelunking-macos-screentime-app-usage-with-r/\n\n\n## Usage\n\nRequirements:\n\n - Python 3.7+\n - Poetry\n\nInstall dependencies with: `poetry install`\n\nRun script with: `poetry run python3 main.py`\n\n\n## Limitations of Knowledge.db\n\n - 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?)\n   - It almost seems like sometimes it does and sometimes it doesn't, weird.\n   - Is it different for iOS?\n - How far back does the history go?\n   - On my VM it goes to 2020-02-01 (~2.5mo back), but I've definitely used the machine before that.\n - How often does the db file update?\n   - I can't seem to retrieve the latest entries, maybe they are stuck in WAL?\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Factivitywatch%2Faw-import-screentime","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Factivitywatch%2Faw-import-screentime","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Factivitywatch%2Faw-import-screentime/lists"}