A Windows scheduled task which monitors screenshots & screen recordings, aggregates them into sessions, and uploads them to Google Drive and Notion.
-
Generally follow PyDrive2 authentication quick guide.
-
Configure OAuth in Google Auth Platform / Data acces to have
./auth/drive.filescope, not./auth/drive. Scope./auth/drive.fileis a restricted version of./auth/driveand doesn't require verification of the application. -
Publish the application in Google Auth Platform / Audience to Production. This will extend the lifespan of the access tokens.
- Poetry for dependency management
- Interactive notebook can be used by running
poetry install --with notebook - Production/test environments are configured by using
.env(prod) anddev.env(debugging)
- Internal processing datetime timezone format is UTC.
- One client is allowed at the time, because it is a personal tracker.
- The Notion DB is used for state management. On Notion write failure files will be re-scanned with Google Drive, but not reuploaded.
Batch ETL is used uploading. Stream based processing coupled with USN Journal queries and full re-scans fallbacks was considered but a continuous watchdog process for a sparse producer (me) with latency tolerances of 1+ hours is unnecessary.