Class: Warc::CLI
- Inherits:
-
Thor
- Object
- Thor
- Warc::CLI
- Defined in:
- lib/warc/cli.rb
Instance Method Summary collapse
Instance Method Details
#dump(path) ⇒ Object
9 10 11 12 13 14 15 |
# 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([: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 |