Sha256: 15e293b083942237190aa8b9e8976e57a1b4f883dac4078bd8538854de7fdd14
Contents?: true
Size: 548 Bytes
Versions: 13
Compression:
Stored size: 548 Bytes
Contents
#!/usr/bin/env ruby require 'rbbt-util' require 'rbbt/util/simpleopt' options = SOPT.get("-tch--tokyocabinet:-tcb--tokyocabinet_bd") file = ARGV.shift file = STDIN if file == '-' case when options[:tokyocabinet] tsv = Persist.open_tokyocabinet(file, false) when options[:tokyocabinet_bd] tsv = Persist.open_tokyocabinet(file, false, nil, TokyoCabinet::BDB) else if String === file file = file.dup Path.setup(File.expand_path(file)) end tsv = TSV.open(file) end tsv.each{|k,v| puts (Array === v ? v.flatten*"\t" : v.to_s ) }
Version data entries
13 entries across 13 versions & 1 rubygems