--- package-plot.py.orig 2007-12-10 17:46:41.000000000 -0800 +++ package-plot.py 2007-12-10 18:58:34.000000000 -0800 @@ -49,10 +49,25 @@ days = { now = int(open('%s' % sourcepackagedata ).read().splitlines().pop().split(",")[0]) for day in days.keys(): + dfile = sourcepackagedata xmin = now - days[day]['span'] + dstep = days[day]['step'] + for stat in statinfo.keys(): - print ''' -set format x "%s" -set output "%s/plots/%s-%s-%s.svg" -plot ["%d":] "%s" using 1:%d every %d title "%s" with linespoints pointtype 7 pointsize 0.6, "< tail -n 1 %s" using 1:%d notitle with points pointtype 6 -''' % (days[day]['format'], sourcepackage, sourcepackage, day, stat, xmin, sourcepackagedata, statinfo[stat]['column'], days[day]['step'], statinfo[stat]['title'], sourcepackagedata, statinfo[stat]['column']) + title = statinfo[stat]['title'] + column = statinfo[stat]['column'] + print '''set format x "%s"''' % (days[day]['format']) + print '''set output "%s/plots/%s-%s-%s.svg"''' \ + % (sourcepackage, sourcepackage, day, stat) + print '''plot ["%d":] "%s" using 1:%d every %d title "%s" with linespoints pointtype 7 pointsize 0.6, "< tail -n 1 %s" using 1:%d notitle with points pointtype 6''' \ + % (xmin, dfile, column, dstep, title, dfile, column) + print + + # Open bugs + print '''set format x "%s"''' % (days[day]['format']) + print '''set output "%s/plots/%s-%s-%s.svg"''' \ + % (sourcepackage, sourcepackage, day, 'open') + print '''plot ["%d":] "%s" using 1:($2-$9-$10-$11) every %d title "%s" with linespoints pointtype 7 pointsize 0.6, "< tail -n 1 %s" using 1:($2-$9-$10-$11) notitle with points pointtype 6''' \ + % (xmin, dfile, dstep, 'Open', dfile) + print +