Created
November 25, 2013 13:17
-
-
Save commuterjoy/7641048 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# grep -Ri 'm.d.viewability.Viewability' * | cut -d ':' -f 2- | cut -d ' ' -f 1,2,8- > raw | |
# ruby formatter < raw > advert-data-raw | |
# sort advert-data-raw > advert-data-raw.sorted | |
STDIN.read.split("\n").each { |a| | |
b = a.split(",") | |
date = b.shift | |
data = b.slice(0,b.length).map { |f| | |
c = f.split("->")[1] | |
c.gsub!(/Some\(([\d+])\)/, '\1') | |
c.gsub!("None", "-") | |
c | |
} | |
puts data.unshift(date).join(",") | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment