1 |
hwoarang 14/04/29 19:21:11 |
2 |
|
3 |
Modified: get_portage_stats.py |
4 |
Log: |
5 |
Multiple fixes |
6 |
|
7 |
- Expand the X axis limit to match the one of the architecture with the most |
8 |
packages |
9 |
- Fix alternative name for the image file |
10 |
|
11 |
Revision Changes Path |
12 |
1.6 src/gwn/get_portage_stats.py |
13 |
|
14 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/gwn/get_portage_stats.py?rev=1.6&view=markup |
15 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/gwn/get_portage_stats.py?rev=1.6&content-type=text/plain |
16 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo/src/gwn/get_portage_stats.py?r1=1.5&r2=1.6 |
17 |
|
18 |
Index: get_portage_stats.py |
19 |
=================================================================== |
20 |
RCS file: /var/cvsroot/gentoo/src/gwn/get_portage_stats.py,v |
21 |
retrieving revision 1.5 |
22 |
retrieving revision 1.6 |
23 |
diff -u -r1.5 -r1.6 |
24 |
--- get_portage_stats.py 5 Apr 2014 17:51:41 -0000 1.5 |
25 |
+++ get_portage_stats.py 29 Apr 2014 19:21:11 -0000 1.6 |
26 |
@@ -86,6 +86,8 @@ |
27 |
tvals.append(round(testing[i] / 123.81, 2)) |
28 |
tot.append(stable[i]+testing[i]) |
29 |
|
30 |
+max_arch=max(tot) |
31 |
+ |
32 |
string1 = '' |
33 |
string2 = '' |
34 |
for i in range(0, len(svals)): |
35 |
@@ -96,15 +98,14 @@ |
36 |
string2 += ',' |
37 |
|
38 |
print """<p style="text-align: center"><img class=" wp-image-216 aligncenter" |
39 |
-style="line-height: 24px" alt="gmn-portage-stats-2013-11" |
40 |
+style="line-height: 24px" alt="gmn-portage-stats-%s" |
41 |
src="http://blogs.gentoo.org/news/files/%s/gmn-portage-stats-%s.png" |
42 |
width="800" height="350" /></p> |
43 |
-""" % (datefor, dateimg) |
44 |
-#print string1 |
45 |
-#print string2 |
46 |
+""" % (dateimg, datefor, dateimg) |
47 |
+ |
48 |
print "\n== Chart URL == (save it as \"gmn-portage-stats-%s.png\")\n\n" %dateimg |
49 |
base = 'http://chart.apis.google.com/chart?cht=bhs&chs=800x350&chd=t:' |
50 |
-tail = '&chco=45347B,6A5C95&chbh=15&chxt=x,y&chxr=0,0,12250&chdl=Stable|Testing' |
51 |
+tail = '&chco=45347B,6A5C95&chbh=15&chxt=x,y&chxr=0,0,%s&chdl=Stable|Testing' % (max_arch) |
52 |
labx = '&chxl=0:1000|1000|1000|1000|1000|1000|1000|1000|1000|1000|1000|1000|1000|1000|1000|' |
53 |
laby = '1:' |