2015-07-27 22:57:32 +02:00
|
|
|
desc 'Import Paper records from setup importers'
|
|
|
|
task import_papers: :environment do
|
|
|
|
require 'open-uri'
|
|
|
|
Importer.all.each do |importer|
|
|
|
|
uri = URI.parse(importer.url)
|
|
|
|
Paper.import_from_json(uri.read)
|
2015-04-13 22:09:28 +02:00
|
|
|
end
|
|
|
|
end
|