From e0e154681a2fba9800b23dd6c169489539c6109b Mon Sep 17 00:00:00 2001
From: Lucas Nussbaum <lucas.nussbaum@loria.fr>
Date: Tue, 19 Jun 2018 21:53:11 +0200
Subject: [PATCH] [dev] update doc about wiki generators

---
 Rakefile                              | 21 +++++++--------------
 generators/wiki/lib/wiki_generator.rb |  2 +-
 2 files changed, 8 insertions(+), 15 deletions(-)

diff --git a/Rakefile b/Rakefile
index 378dfbf7e1..a7c8eb58ff 100644
--- a/Rakefile
+++ b/Rakefile
@@ -43,20 +43,13 @@ namespace :validators do
   end
 end
 
-namespace :wiki do
-
-  all_wiki_tasks = [:cpu_parameters, :oar_properties, :disk_reservation, :hardware, :site_hardware, :site_network]
-
-  all_wiki_tasks.each { |t|
-    desc "Generate the media parts for #{t}"
-    task t do
-      invoke_script "#{WIKI_DIR}/#{t}.rb"
-    end
-  }
-
-  desc "Launch all wiki generators"
-  task :all => all_wiki_tasks
-
+desc "See info about wiki generators"
+task "wiki" do
+  puts "Wikigenerators are in generators/wiki. See the 'wikigen' script."
+  puts " => generators/wiki/wikigen -h"
+  puts "Examples:"
+  puts "  generators/wiki/wiki -g cpu_parameters -s global -d"
+  puts "  generators/wiki/wiki -g site_hardware -s nancy -d"
 end
 
 desc "Creates json data from inputs"
diff --git a/generators/wiki/lib/wiki_generator.rb b/generators/wiki/lib/wiki_generator.rb
index 320780b3ab..bb97dc0967 100644
--- a/generators/wiki/lib/wiki_generator.rb
+++ b/generators/wiki/lib/wiki_generator.rb
@@ -139,7 +139,7 @@ class WikiGenerator
     }
 
     opt_parse = OptionParser.new do |opts|
-      opts.banner = "Usage: <wiki_generator>.rb\n"
+      opts.banner = "Usage: wikigen\n"
       opts.banner += "This script looks for file ~/.grid5000_api.yml containing your API username and password credentials. The script also recognize API_USER and API_PASSWORD environment variables."
 
       opts.on('-g', '--generators=generator1,generator2', Array, 'Run those generators') do |g|
-- 
GitLab