dcav-stats/plot.rb
Christoffer Müller Madsen a324a3217c initial commit
2017-01-24 17:09:09 +01:00

19 lines
472 B
Ruby

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