diff --git a/lib/tasks/projects.rake b/lib/tasks/projects.rake index 4bf2649c..7ce0e984 100644 --- a/lib/tasks/projects.rake +++ b/lib/tasks/projects.rake @@ -81,6 +81,16 @@ namespace :projects do puts service.aterm_script end + desc "Outputs to a file the Aterm script to create a project in Mediaflux" + task :create_script_file, [:project_id] => [:environment] do |_, args| + project_id = args[:project_id] + project = Project.find(project_id) + service = MediafluxScriptFactory.new(project: project) + file_name = "project_create_#{project.id}.txt" + puts "Saving script to #{file_name}" + File.write(file_name, service.aterm_script) + end + task :download_file_list, [:netid, :project_id] => [:environment] do |_, args| netid = args[:netid] user = User.where(uid: netid).first