I created a small script a while ago that takes a picture of my desktop, resizes it and stamps the current date and time to it using ImageMagick. I run the script using a launch agent that runs every 45 seconds.
Afterwards, I create a movie from the screenshots using another script and ffmpeg. Here is the GitHub repo if anybody wants to use it.
My motivation for creating the script was to be able to quickly view my day infront of my screen to see what I did during the day. Especially when I feel that I was not very productive. Also, it helps me remember a day – seeing what I did gives me clues to what I was thinking during the day.
GitHub Repo: https://github.com/fnurl/screenlog