hwoarang    14/04/29 19:21:11

  Modified:             get_portage_stats.py
  Log:
  Multiple fixes
  
  - Expand the X axis limit to match the one of the architecture with the most
    packages
  - Fix alternative name for the image file

Revision  Changes    Path
1.6                  src/gwn/get_portage_stats.py

file : 
http://sources.gentoo.org/viewvc.cgi/gentoo/src/gwn/get_portage_stats.py?rev=1.6&view=markup
plain: 
http://sources.gentoo.org/viewvc.cgi/gentoo/src/gwn/get_portage_stats.py?rev=1.6&content-type=text/plain
diff : 
http://sources.gentoo.org/viewvc.cgi/gentoo/src/gwn/get_portage_stats.py?r1=1.5&r2=1.6

Index: get_portage_stats.py
===================================================================
RCS file: /var/cvsroot/gentoo/src/gwn/get_portage_stats.py,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- get_portage_stats.py        5 Apr 2014 17:51:41 -0000       1.5
+++ get_portage_stats.py        29 Apr 2014 19:21:11 -0000      1.6
@@ -86,6 +86,8 @@
        tvals.append(round(testing[i] / 123.81, 2))
        tot.append(stable[i]+testing[i])
 
+max_arch=max(tot)
+
 string1 = ''
 string2 = ''
 for i in range(0, len(svals)):
@@ -96,15 +98,14 @@
                string2 += ','
 
 print """<p style="text-align: center"><img class=" wp-image-216 aligncenter"
-style="line-height: 24px" alt="gmn-portage-stats-2013-11"
+style="line-height: 24px" alt="gmn-portage-stats-%s"
 src="http://blogs.gentoo.org/news/files/%s/gmn-portage-stats-%s.png";
 width="800" height="350" /></p>
-""" % (datefor, dateimg)
-#print string1
-#print string2
+""" % (dateimg, datefor, dateimg)
+
 print "\n== Chart URL == (save it as \"gmn-portage-stats-%s.png\")\n\n" 
%dateimg
 base = 'http://chart.apis.google.com/chart?cht=bhs&chs=800x350&chd=t:'
-tail = 
'&chco=45347B,6A5C95&chbh=15&chxt=x,y&chxr=0,0,12250&chdl=Stable|Testing'
+tail = '&chco=45347B,6A5C95&chbh=15&chxt=x,y&chxr=0,0,%s&chdl=Stable|Testing' 
% (max_arch)
 labx = 
'&chxl=0:1000|1000|1000|1000|1000|1000|1000|1000|1000|1000|1000|1000|1000|1000|1000|'
 laby = '1:'
 




Reply via email to