Sha256: 04833e9bbf7a67b9f0725f4b4bbc0a669df6cacb88a3276ea18d10b330fcda8f

Contents?: true

Size: 897 Bytes

Versions: 13

Compression:

Stored size: 897 Bytes

Contents

namespace :iqvoc do

  desc 'Exports iQvoc data to rdf serialization (turtle, ntriples, rdf/xml)'
  task :export => :environment do

    raise "You have to specify an rdf serialization format (turtle, ntriples or rdf/xml) for the data file to be exported. Example: rake iqvoc:import TYPE=... NAMESPACE=... [FILE=...]" unless ENV['TYPE']
    raise "You have to specify a default namespace for the data to be imported. Example: rake iqvoc:import TYPE=... NAMESPACE=... [FILE=...]" unless ENV['NAMESPACE']

    stdout_logger = Logger.new(STDOUT)
    stdout_logger.level = Logger::INFO

    timestamp = Time.now.strftime("%Y-%m-%d_%H-%M")
    file_path = ENV['FILE'] || Rails.root.join(Iqvoc.export_path, "iqvoc_dump-#{timestamp}.#{ENV['TYPE']}").to_s

    exporter = SkosExporter.new(file_path, ENV['TYPE'], ENV['NAMESPACE'], MultiLogger.new(stdout_logger, Rails.logger))
    exporter.run
  end

end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
iqvoc-4.14.5 lib/tasks/exporter.rake
iqvoc-4.14.4 lib/tasks/exporter.rake
iqvoc-4.13.2 lib/tasks/exporter.rake
iqvoc-4.13.0 lib/tasks/exporter.rake
iqvoc-4.12.1 lib/tasks/exporter.rake
iqvoc-4.12.0 lib/tasks/exporter.rake
iqvoc-4.11.1 lib/tasks/exporter.rake
iqvoc-4.11.0 lib/tasks/exporter.rake
iqvoc-4.10.0 lib/tasks/exporter.rake
iqvoc-4.9.0 lib/tasks/exporter.rake
iqvoc-4.8.2 lib/tasks/exporter.rake
iqvoc-4.8.1 lib/tasks/exporter.rake
iqvoc-4.8.0 lib/tasks/exporter.rake