Kouhei Sutou
null+****@clear*****
Sat Mar 15 21:47:25 JST 2014
Kouhei Sutou 2014-03-15 21:47:25 +0900 (Sat, 15 Mar 2014) New Revision: 331868217ad43478c2e075d6e96802c2fb729b05 https://github.com/droonga/grn2drn/commit/331868217ad43478c2e075d6e96802c2fb729b05 Message: Add grn2drn-schema It generates JSON in Droonga style from Groonga schema. Added files: bin/grn2drn-schema Added: bin/grn2drn-schema (+25 -0) 100755 =================================================================== --- /dev/null +++ bin/grn2drn-schema 2014-03-15 21:47:25 +0900 (747df8a) @@ -0,0 +1,25 @@ +#!/usr/bin/env ruby +# -*- coding: utf-8 -*- +# +# Copyright (C) 2014 Droonga Project +# +# 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 "json" + +require "grn2drn/schema-converter" + +converter = Grn2Drn::SchemaConverter.new +schema = converter.convert(ARGF) +puts(JSON.pretty_generate(schema)) -------------- next part -------------- HTML����������������������������...Download