2 from dateutil.parser import parse
4 import dateutil.tz as tz
7 START = datetime.datetime(2009, 12, 21, 6)
9 with open('out/report.yml') as r:
10 report = yaml.safe_load(r)
12 with open('bloggers.yml') as f:
13 users = yaml.safe_load(f)
15 week = (parse(sys.argv[1], default=START) - START).days / 7
16 week_start = START + (week * datetime.timedelta(7))
17 week_end = START + ((week + 1) * datetime.timedelta(7))
20 for (name, weeks) in report.items():
21 user_start = parse(users[name]['start'], default=START)
22 if user_start > week_start:
23 print "SKIP %s" % (name,)
25 elif len(weeks) <= week or not weeks[week]:
26 print "LAME %s" % (name,)
28 print "OK %s" % (name,)