Sha256: e2b90b10d4b0227a3cabd6c2495ceffa62688f796d92838374dceafe44c1dab9

Contents?: true

Size: 1.2 KB

Versions: 2

Compression:

Stored size: 1.2 KB

Contents

# MdTranslator - code to test mdtranslator from Ruby Terminal during development

# uncomment next 2 lines to run code (not gem) ....
lib = File.expand_path('lib')
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)

require 'adiwg-mdtranslator'

puts 'start test script'

# read test adiwg full json test
file = File.open('test/adiwgJson_full_test_example.json', 'r')
jsonObj = file.read
file.close

# call opening module in mdTranslator
metadata = ADIWG::Mdtranslator.translate(jsonObj,'adiwgJson','iso19115_2','normal','true')

# send all the output to the terminal
require 'pp'
writerOut = metadata[:writerOutput]
metadata[:writerOutput] = 'Extracted'
puts '---------------------=======================BEGIN=========================---------------------------'
pp metadata
puts writerOut.to_s
# pp writerOut
puts '---------------------========================END==========================---------------------------'

# # test for resource path
# puts ADIWG::Mdtranslator.path_to_resources

# # test reader readme
# puts ADIWG::Mdtranslator.get_reader_readme('adiwgJson')
# puts '================================================='
# puts ADIWG::Mdtranslator.get_writer_readme('iso19115_2')

puts 'test script has completed'

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
adiwg-mdtranslator-0.8.6 test/dev.rb
adiwg-mdtranslator-0.8.5 test/dev.rb