dcav-stats/plot.rb

19 lines
472 B
Ruby
Raw Normal View History

2017-01-24 16:09:09 +00:00
users = ["christoffermadsen","jmaa","jacob","alexander"]
log_dir = "./log/"
plotstring = %Q[set terminal 'png'
set output "/home/christoffermadsen/public_html/img/screenshot_count.png"
set title "Screenshot Count"
set key left box
set xdata time
set timefmt "%s"
set format x "%m/%d"
set yrange [0:500]
plot ]
users.each do |user|
plotstring += %Q["log/#{user}.log" using 1:2 with lines, \\\n]
end
output = File.open("plotscript","w")
output << plotstring
output.close