2017-01-30 13:06:38 +00:00
|
|
|
person = ARGV[0]
|
|
|
|
product = ARGV[1]
|
|
|
|
amount = ARGV[2]
|
|
|
|
log_dir = "./log/"
|
|
|
|
|
|
|
|
amount = 1.0 unless amount
|
|
|
|
|
2017-01-30 14:23:50 +00:00
|
|
|
output = File.open("#{log_dir}/matkant-#{Time.now.strftime('%Y%W')}.log","a+")
|
2017-01-30 13:06:38 +00:00
|
|
|
output << "#{Time.now.to_i};#{person};#{product};#{amount}\n"
|
|
|
|
output.close
|