Created
June 3, 2014 09:34
-
-
Save dudarev/8d098de7c1a96ba158ca to your computer and use it in GitHub Desktop.
Take screenshots regularly
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env python | |
""" | |
Take screenshots every SLEEP_TIME seconds. | |
""" | |
import time | |
import subprocess | |
SLEEP_TIME = 10 | |
COMMAND = "import -window root -format png data/{timestamp}.png" | |
while True: | |
ts = int(time.time()) | |
print ts | |
subprocess.call(COMMAND.format(timestamp=ts), shell=True) | |
time.sleep(SLEEP_TIME) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment