Sha256: ab1ff55ec3f1a8259eb1088abf0a81781e1034924a523418d5b29ac5075c5aef

Contents?: true

Size: 1.41 KB

Versions: 18

Compression:

Stored size: 1.41 KB

Contents

#!/usr/bin/env ruby
# -*- coding: utf-8 -*-
#
# Copyright (C) 2012-2013  Kouhei Sutou <kou@clear-code.com>
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License version 2.1 as published by the Free Software Foundation.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA

require "ostruct"
require "optparse"
require "pathname"

require "groonga"

options = OpenStruct.new
options.output_directory = "index-dump"

option_parser = OptionParser.new do |parser|
  parser.version = Groonga::BINDINGS_VERSION
  parser.banner += " DB_PATH"

  parser.on("--output-directory=DIRECTORY",
            "Dump index to under DIRECTORY",
            "(#{options.ouitput_directory})") do |directory|
    options.output_directory = directory
  end
end
args = option_parser.parse!(ARGV)

if args.size != 1
  puts(option_parser)
  exit(false)
end
db_path = args[0]

Groonga::Database.open(db_path) do |database|
  database.dump_index(options.output_directory)
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
rroonga-4.0.3-x86-mingw32 bin/groonga-index-dump
rroonga-4.0.3-x64-mingw32 bin/groonga-index-dump
rroonga-4.0.3 bin/groonga-index-dump
rroonga-4.0.2-x64-mingw32 bin/groonga-index-dump
rroonga-4.0.2-x86-mingw32 bin/groonga-index-dump
rroonga-4.0.2 bin/groonga-index-dump
rroonga-4.0.1-x86-mingw32 bin/groonga-index-dump
rroonga-4.0.1-x64-mingw32 bin/groonga-index-dump
rroonga-4.0.1 bin/groonga-index-dump
rroonga-4.0.0-x64-mingw32 bin/groonga-index-dump
rroonga-4.0.0-x86-mingw32 bin/groonga-index-dump
rroonga-4.0.0 bin/groonga-index-dump
rroonga-3.1.2-x64-mingw32 bin/groonga-index-dump
rroonga-3.1.2-x86-mingw32 bin/groonga-index-dump
rroonga-3.1.2 bin/groonga-index-dump
rroonga-3.1.1-x64-mingw32 bin/groonga-index-dump
rroonga-3.1.1-x86-mingw32 bin/groonga-index-dump
rroonga-3.1.1 bin/groonga-index-dump