stadtratmonitor/lib/tasks/import_papers.rake
2020-09-20 23:18:17 +02:00

8 lines
320 B
Ruby

desc 'Import Paper records from setup importers'
task import_papers: :environment do
require 'open-uri'
#OpenSSL::SSL::VERIFY_PEER = OpenSSL::SSL::VERIFY_NONE
#api_key = Rails.application.config_for(:morph)['key']
uri = URI.parse("https://joergreichert.de/srm/input.json")
Paper.import_from_json(uri.read)
end