#!/usr/bin/python
import os
import time

# This takes a screen shot every 60 seconds, and reduces the size so
# the largest dimension is 640.
# Written by Marc Pickett I of Padelford

while True:
    # a = time.gmtime()
    a = time.localtime()
    s = str (a[0])
    for i in xrange (1,6):
        s = s + '-'
        if a[i] < 10: s = s + '0'
        s = s + str (a[i])
    os.system ('screencapture -C -m -t jpg -x ' + s + '.jpg')
    # os.system ('convert -size 640x480 ' + s + '.jpg -resize 640x480 ' + s + '.jpg')
    os.system ('convert -size 320x240 ' + s + '.jpg -resize 320x240 ' + s + '.jpg')
    time.sleep (60)
