diff options
author | Craig Tiller <ctiller@google.com> | 2017-03-28 14:36:50 -0700 |
---|---|---|
committer | Craig Tiller <ctiller@google.com> | 2017-03-28 14:36:50 -0700 |
commit | e2e34b8812f36eafa4fb2391bd3eb72d17d9789d (patch) | |
tree | d1263a9dc6787ff239a65536e1254d95892e890c /tools/line_count/summarize-history.py | |
parent | 0fe74d35ee31ac3fb38fe647786b0b71629d64d0 (diff) |
Line counter
Diffstat (limited to 'tools/line_count/summarize-history.py')
-rwxr-xr-x | tools/line_count/summarize-history.py | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/tools/line_count/summarize-history.py b/tools/line_count/summarize-history.py new file mode 100755 index 0000000000..edaaf6517b --- /dev/null +++ b/tools/line_count/summarize-history.py @@ -0,0 +1,17 @@ +#!/usr/bin/env python + +import subprocess +import datetime + +def daterange(start, end): + for n in range(int((end - start).days)): + yield start + datetime.timedelta(n) + +start_date = datetime.date(2014, 11, 26) +end_date = datetime.date(2017, 3, 26) + +for dt in daterange(start_date, end_date): + dmy = dt.strftime('%Y-%m-%d') + print dmy + subprocess.check_call(['tools/line_count/yaml2csv.py', '-i', '../count/%s.yaml' % dmy, '-d', dmy, '-o', '../count/%s.csv' % dmy]) + |