The same can be achieved by just running screencapture(1) periodically, although cron is broken in Mac OS and probably you can't access screen from cron jobs. So, while loop in shell with sleep, for example, or StartInterval in launchd job.
Avoiding screenshoting when screen is locked is more complicated, though. You have to access Quartz.CGSessionCopyCurrentDictionary somehow, i.e. from python.
P.S. does Automator or Applescript allows to achieve the same functionality?
It’s a nicer experience than using a hand rolled script, particularly playback and handling of edge cases.
It’s a bit like saying “instead of buying food from a shop you could just grow your own food.” It’s technically true, but then you’re responsible for all the care and feeding of the tree instead of other activities that are higher economic value to you.
When we first thought of the idea, over a decade ago, people immediately raised that concern. But few of them wrote the script. Or if they did, they abandoned it after a while and it languished because they didn’t invest the time to do it nicely.
Playback of the images is the first big advantage to having someone else write the code. But also it means that someone has put effort into dealing with cases such as multiple monitors, and multiple monitors with varying DPI and so on. Avoiding screenshots when idle, avoiding duplicates etc.
But I do love scripting up personal solutions to things, and spend far too much time doing exactly that. So I like the attitude.
Yup, this is a very common effect that is used by almost every technology in existence. Almost anything is replicable, and engineers love to point that out, and how little time it would take them to replicate as a humblebrag hidden as a comment on triviality of the product. In reality, though, convenience and user experience is what makes the world work, not how easy something is on paper, because that last 20% that makes anything valuable can sure as hell be paid for only in the currency of blood, sweat and tears. (And time.)
Industrial revolution was a thing because it made easier the manufacturing of clothing. People could do it by hand before, the end product wasn’t something a human hand couldn’t. It just made it slightly simpler, and here we are 200 years later, counting atoms on microprocessor semiconductor walls.
Avoiding screenshoting when screen is locked is more complicated, though. You have to access Quartz.CGSessionCopyCurrentDictionary somehow, i.e. from python.
P.S. does Automator or Applescript allows to achieve the same functionality?