Skip to content
No description or website provided.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
.gitignore getopt. Missing some help usage. Apr 27, 2012 --image-dir fixed and README. Apr 29, 2012

Git time lapse checks out git commits and takes screenshots of the web browser given a URL. I developed the script for myself because I thought it could be interesting to see the evolution of a web page in time. The ultimate idea is to create a video out of all the screenshots generates. I've created this one using iPhoto but I'd like to implement an automatic video creation probably using the opencv library.

Install Requirements requires selenium and pythongit. You can install them using pip:

$ pip install selenium
$ pip install gitpython

How to use it

Make sure your run the web server. In this example a simple rails s will do:

$ rails s

Then run gittimelapse, it will store all the images into the relative path './files'. You can override the behaviour with the option --images-dir:

$ python -c /Users/johnlucas/Coding/mvpeers http://localhost:3000 
Getting Repo
Getting Head
Getting Commits
Taking Screenshots
Cleaning up...
Restoring original head (master)

The script will get the list of all your commits for your current branch, will fire a browser and take a screenshot of each commit checkout. Eventually it will restore the original HEAD.

Selenium Webdriver

The default browser is Firefox because WebDriver doesn't need an extra binary for that. If you want to use chrome you need to download the driver binary and put it in your PATH and then run with the -c or --chrome option:

python -c /Users/johnlucas/Dropbox/Coding/mvpeers/ http://localhost:3000
Something went wrong with that request. Please try again.