Gentoo Archives: gentoo-commits

From: "Markos Chandras (hwoarang)" <hwoarang@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo commit in src/gwn: gmn_bugzie_aggregate.py
Date: Thu, 31 Oct 2013 19:13:40
Message-Id: 20131031191259.924ED20047@flycatcher.gentoo.org
1 hwoarang 13/10/31 19:12:59
2
3 Modified: gmn_bugzie_aggregate.py
4 Log:
5 gmn_bugzie_aggregate.py: Generate unique files for each GMN
6
7 Revision Changes Path
8 1.4 src/gwn/gmn_bugzie_aggregate.py
9
10 file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/gwn/gmn_bugzie_aggregate.py?rev=1.4&view=markup
11 plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/gwn/gmn_bugzie_aggregate.py?rev=1.4&content-type=text/plain
12 diff : http://sources.gentoo.org/viewvc.cgi/gentoo/src/gwn/gmn_bugzie_aggregate.py?r1=1.3&r2=1.4
13
14 Index: gmn_bugzie_aggregate.py
15 ===================================================================
16 RCS file: /var/cvsroot/gentoo/src/gwn/gmn_bugzie_aggregate.py,v
17 retrieving revision 1.3
18 retrieving revision 1.4
19 diff -u -r1.3 -r1.4
20 --- gmn_bugzie_aggregate.py 13 Oct 2013 10:32:43 -0000 1.3
21 +++ gmn_bugzie_aggregate.py 31 Oct 2013 19:12:59 -0000 1.4
22 @@ -1,6 +1,7 @@
23 #!/usr/bin/env python
24
25 from pygooglechart import *
26 +import time
27 data = open('breport')
28
29 butota = []
30 @@ -17,6 +18,10 @@
31 ontable = 0
32 onheaders = 0
33 ontext = 0
34 +endtime = time.gmtime(time.time() - (60 * 60 * 24 * 5))
35 +# Format the string to what we expect
36 +date_to = time.strftime("%Y-%m", endtime)
37 +
38 for i in data:
39 if not i.startswith("[table]") and ontable == 0:
40 continue
41 @@ -69,7 +74,7 @@
42 activity.set_colours(['45347B'])
43 activity.add_data(budata)
44 activity.set_pie_labels(bukeys)
45 -activity.download('activity.png')
46 +activity.download('gmn-activity-%s.png' % date_to)
47
48 clmax = max(cldata)
49 clnor = map(lambda x: (x / float(clmax)) * 100, cldata)
50 @@ -80,7 +85,7 @@
51 clkeys.reverse()
52 closed.set_axis_labels(Axis.LEFT, clkeys)
53 closed.set_axis_labels(Axis.BOTTOM, map(str, range(0, int(round(max(cldata))) + 10, 10)))
54 -closed.download('closed.png')
55 +closed.download('gmn-closed-%s.png' % date_to)
56
57 opmax = max(opdata)
58 opnor = map(lambda x: (x / float(opmax)) * 100, opdata)
59 @@ -91,7 +96,7 @@
60 opkeys.reverse()
61 opened.set_axis_labels(Axis.LEFT, opkeys)
62 opened.set_axis_labels(Axis.BOTTOM, map(str, range(0, int(round(max(opdata))) + 10, 10)))
63 -opened.download('opened.png')
64 +opened.download('gmn-opened-%s.png' % date_to)
65
66 clkeys.reverse()
67 opkeys.reverse()