Skip to content

sprugman/screentime

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ScreenTime

"All right, Mr. DeMille, I'm ready for my close-up."

What is this?

I'm absolutely terrible at tracking my time. I always forget to start the timer. And then I always forget to stop the timer when I switch tasks. However, I think knowing how long I spend on things would be useful. To that end, I'm using the free version of toggl for tracking time, but supplementing it with an automated screencapture system so I can easily review what I was doing on my computer when.

There are several apps available that integrate screenshots with timing software, but I find the creep factor too strong to want to use them. Instead, I wrote a simple shell script to capture screenshots, along with a simple web app for viewing them.

Pull requests & contributions are encouraged.

How to use it?

There are three components, all of which are in this repository:

  • capture.sh -- a bash script for capturing screenshots on a periodic basis
  • local server -- any simple static server will do
  • capture viewer -- a single-page web app for viewing the captured screenshots

Check out the project, create screens, screens/full & screens/thumbs folders inside the project, and run capture.sh in a shell. I just leave it running pretty much all the time. For the capture viewer, any static server will do. The easiest is probably the python one built-in to OSX, which you can run by:

  1. entering python -m SimpleHTTPServer 8000 in a terminal from the screentime folder
  2. going to http://localhost:8000 in a browser.

More server suggestions below.

capture.sh

shell script for caturing screenshots periodically

  • just a basic sleep loop that runs every five minutes (configurable)
  • takes a screenshot using OSX's screencapture program
  • copies it into screens/full
  • creates a thumbnail-sized version and copies that to screens/thumbs
  • after each capture, updates a static list of all the files that can be served to the web app (screens/screens-list.txt)
  • auto deletes files older than 20 days (configurable)
  • enhancement ideas:

local server

simple static server to support the capture viewer (below)

capture viewer

single-page web gallery for viewing images

Screenshot of the Capture Viewer Capture Viewer with an image zoomed

  • pretty basic at the moment
  • enhancement ideas:
    • UI
      • sort with most recent group on top
      • open/close groups
      • group by day
      • add control panel
        • time range slider / pagination (currently only shows most recent 150 images)
        • open/close all
        • sorting options
        • grouping options(?)
      • zoomed view
        • make max size larger
        • prev/next buttons over whole image
        • keyboard navigation
      • badges are hard to notice & not that useful
      • auto refresh with latest screenshots
    • Technical
      • proper build process w/ linting & tests
      • sass
      • clean up architecture a bit

time tracking integration

Not implemented

License

MIT

About

Track your time with screenshots

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published