summaryrefslogtreecommitdiff
path: root/get-temps.rb
blob: ac24051182dfd05ef44f1563535d8541e5a9c605 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/usr/bin/env ruby

while line = STDIN.gets
  a = line.split
  d = {}
  a.each { |i|
    name, val = i.split("::")
    if name == "temperature"
      d["temperature"] = val
    end
    if name == "device_id"
      d["dev"] = val
    end
  }
  puts d.to_s
end