class Warc::CLI
Public Instance Methods
dump(path)
click to toggle source
# File lib/warc/cli.rb, line 9 def dump(path) w=Warc.open_stream(path) puts "WARC filename\toffset\twarc-type\twarc-target-uri\twarc-record-id\tcontent-type\tcontent-length" w.each(options[:offset]) do |record| puts "#{path}\t#{record.offset}\t#{record.header['warc-type']}\t#{record.header['warc-target-uri']}\t#{record.header['warc-record-id']}\t#{record.header['content-type']}\t#{record.header.content_length}" end end
replay(warc)
click to toggle source
# File lib/warc/cli.rb, line 19 def replay(warc) Warc::Proxy::Replay.start(warc,options[:p]) end