Sha256: 703238d60be668b8b0035e7386a0b3270bcce046f7506a11f7cfb66f5ac0db19
Contents?: true
Size: 744 Bytes
Versions: 10
Compression:
Stored size: 744 Bytes
Contents
#!/usr/bin/env ruby require 'rubygems' require 'trollop' require "sup" $opts = Trollop::options do version "sup-dump (sup #{Redwood::VERSION})" banner <<EOS Dumps all message state from the sup index to standard out. You can later use sup-sync --restored --restore <filename> to recover the index. This tool is primarily useful in the event that a Ferret upgrade breaks the index format. This happened, for example, at Ferret version 0.11. Usage: sup-dump > <filename> sup-dump | bzip2 > <filename> # even better No options. EOS end index = Redwood::Index.new index.load (1 ... index.index.reader.max_doc).each do |i| next if index.index.deleted? i d = index.index[i] puts [d[:message_id], "(" + d[:label] + ")"] * " " end
Version data entries
10 entries across 10 versions & 1 rubygems