-
Notifications
You must be signed in to change notification settings - Fork 0
Topic Maps for Ruby
License
mikhailian/tm4r
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
A minimal Topic Maps Engine written in Ruby. (Largely inspired by RTM [http://rtm.topicmapslab.de]) Alexander Mikhailian <alexander.mikhailian@spaceapplications.com> <mikhailian@mova.org> = Prerequisites MRI Ruby 1.8.6 or Jruby 1.1.2, rubygems. Install $ gem build tm4r.gemspec $ gem install tm4r*.gem = Sample usage $ irb require 'rubygems' require 'tm4r' require 'tm4r/migrate/001_initial_schema' include TM4R ActiveRecord::Base.establish_connection( :adapter => "sqlite3") InitialSchema.up = Sample session tm = TopicMap.new(:base=>"iri://italian-opera") tm.from_xtm2(File.open("misc/ItalianOpera.xtm2")) t = tm.topics.first t.occurrences t.occurrences.each {|o| print "#{o.datatype}\n"} = Using with MySQL Create a MySQL database with the UTF-8 default encoding $ echo "create database test DEFAULT CHARSET=utf8" |mysql Run $ irb require 'rubygems' require 'tm4r' require 'tm4r/migrate/001_initial_schema' include TM4R ActiveRecord::Base.establish_connection( :adapter => "mysql", :host => "localhost", :username => "test", :password => "test", :database => "test", :encoding => "utf8") InitialSchema.up Check The ActiveRecord documentation [1] for other usage patterns. [1] http://ar.rubyonrails.org
About
Topic Maps for Ruby
Resources
License
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published