contrib/weekly-changelog-report.py: add script to generate
[vuplus_openembedded] / contrib / weekly-changelog-report.py
1 #!/usr/bin/python
2
3
4 # generates an OE changelog for last weeks activity (Mon-Sun) assuming it is run on
5 # any day of the following week
6
7 import datetime
8 import os
9
10 today = datetime.date.today()
11
12 # 0 = Mon, 6 = Sun
13 today_weekday = today.weekday()
14
15 # find Mon of this week
16 end_day = today - datetime.timedelta(today_weekday)
17
18 start_day = end_day - datetime.timedelta(7)
19
20 print "OE weekly changelog %s to %s\n" % (start_day.isoformat(), end_day.isoformat())
21
22 os.system("git-shortlog --since=%s --until=%s" % (start_day.isoformat(), end_day.isoformat()))
23
24