Created
February 27, 2016 00:47
-
-
Save ledlogic/761a3c1e5e7723a9c08d to your computer and use it in GitHub Desktop.
Revisions
-
ledlogic created this gist
Feb 27, 2016 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,15 @@ #!/usr/bin/ruby require 'rubygems' require 'json' require 'csv' infile = ARGV[0] json = File.read(infile) parsed = JSON.parse(json.encode("UTF-8")) outfile = ARGV[1] CSV.open(outfile, "wb") do |csv| parsed["log"]["entries"].each do |entry| csv << [entry["request"]["url"]] end end