diff options
Diffstat (limited to 'delta-wrap.lua')
-rwxr-xr-x | delta-wrap.lua | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/delta-wrap.lua b/delta-wrap.lua new file mode 100755 index 0000000..d63beeb --- /dev/null +++ b/delta-wrap.lua @@ -0,0 +1,16 @@ +#!/usr/bin/env lua +local eyes = require "eyes" +local format = require "format" +local reading = require "reading" +for _, message in ipairs(eyes) do + local previous = 0 + local deltas = {} + for _, value in reading.values(message) do + if value <= previous then + previous = previous - 83 + end + table.insert(deltas, value - previous) + previous = value + end + print(format.csv(deltas)) +end |