From 0d91dcbdb333c89e636d2df85420c5183706036b Mon Sep 17 00:00:00 2001 From: Christoph Helma Date: Sun, 20 Dec 2009 19:12:40 +0100 Subject: Version bump to 0.0.0 --- VERSION | 2 +- bin/yaml2owl.rb | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100755 bin/yaml2owl.rb diff --git a/VERSION b/VERSION index 6085e94..77d6f4c 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.2.1 +0.0.0 diff --git a/bin/yaml2owl.rb b/bin/yaml2owl.rb new file mode 100755 index 0000000..b259ad1 --- /dev/null +++ b/bin/yaml2owl.rb @@ -0,0 +1,18 @@ +#!/usr/bin/env ruby +require 'rubygems' +require 'opentox-ruby-api-wrapper' + +input = YAML.load_file(ARGV[0]) +dataset = OpenTox::Dataset.new +dataset.title = input[:title] +dataset.source = input[:source] +input[:data].each do |c,f| + f.each do |k,v| + v.each do |value| + dataset.add c,k,value + end + end +end +outfile = File.expand_path(File.join(File.dirname(__FILE__),ARGV[0].sub(/yaml/,'owl'))) +dataset.uri = outfile +File.open(outfile,'w+'){|f| f.puts dataset.rdf} -- cgit v1.2.3