Hacker News new | ask | show | jobs
by albertzeyer 1242 days ago
I had a script once which generated a screenshot every minute or so. The idea was that I would then use some other machine learning supported scripts to extract some statistics. One motivation was that I needed to collect working time statistics, and I wanted to count the minutes that I had Eclipse open.

I even wrote a DB to store PNG files more efficiently. It deduplicates blocks, and thus achieves much higher compression rates: https://github.com/albertz/png-db

The analytics were harder than I thought. I had OpenCV at hand, and tried using those SIFT features (if I remember correctly) (note, that was 12 years ago, before we had more powerful neural networks), and it took me lots of trial and error via a lot of ugly heuristics, and in the end I just tried to identify the Eclipse icon in the Mac Dock. But it worked more or less.

And the scripts to analyze the screenshots: https://github.com/albertz/screenshooting

Then, I developed some scripts which would collect such information more directly, about the app in foreground, including the opened file or URL, etc. This is still running, with many years of data now. But I never really had any use of that data. Maybe someday I will extract some interesting statistics out of it.

This script is here, with support for Linux and Mac: https://github.com/albertz/timecapture

1 comments

I made something similar with "brotab", grabbing full text content of all open tabs of the browser (and other metadata) every so often and archiving it, so I can search it like a kind of extended history and correlate URLs by context.