Sha256: df4260ff0701978210c57a8dad140befbf70bac408804e4390e92e08d0425386

Contents?: true

Size: 474 Bytes

Versions: 2

Compression:

Stored size: 474 Bytes

Contents

#!/usr/bin/env ruby

require 'bundler/setup'
$LOAD_PATH.unshift 'lib'
require 'reality'

titles = ARGV.dup

source = Reality::Describers::Wikipedia.new
source.log.level = Logger::DEBUG

if titles.first == 'q'
  query = titles[1..-1].each_cons(2).to_h.transform_keys(&:to_sym)
  pp source.query(query).load
else
  titles.each do |t|
    entity = source.get(t)

    puts "#{t}\n" + "="*t.length + "\n"
    #observations.each(&method(:puts))
    puts entity.describe
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
reality-0.1.0.alpha2 test/wikipedia.rb
reality-0.1.0.alpha test/wikipedia.rb