contrib/weekly-changelog-report.py: add script to generate
authorCliff Brake <cbrake@bec-systems.com>
Mon, 20 Oct 2008 14:48:56 +0000 (10:48 -0400)
committerCliff Brake <cbrake@bec-systems.com>
Mon, 20 Oct 2008 14:48:56 +0000 (10:48 -0400)
contrib/weekly-changelog-report.py [new file with mode: 0755]

diff --git a/contrib/weekly-changelog-report.py b/contrib/weekly-changelog-report.py
new file mode 100755 (executable)
index 0000000..2898c2f
--- /dev/null
@@ -0,0 +1,24 @@
+#!/usr/bin/python
+
+
+# generates an OE changelog for last weeks activity (Mon-Sun) assuming it is run on
+# any day of the following week
+
+import datetime
+import os
+
+today = datetime.date.today()
+
+# 0 = Mon, 6 = Sun
+today_weekday = today.weekday()
+
+# find Mon of this week
+end_day = today - datetime.timedelta(today_weekday)
+
+start_day = end_day - datetime.timedelta(7)
+
+print "OE weekly changelog %s to %s\n" % (start_day.isoformat(), end_day.isoformat())
+
+os.system("git-shortlog --since=%s --until=%s" % (start_day.isoformat(), end_day.isoformat()))
+
+