aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v5/harvest_authors.rb
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2013-10-23 23:40:45 -0400
committerRalph Amissah <ralph@amissah.com>2013-10-23 23:40:45 -0400
commitedd89902036bde18c91031470e19c871a182cf6d (patch)
tree1269e7b1660aa64896fc21768002e837233c2c24 /lib/sisu/v5/harvest_authors.rb
parentv4 v5: version & changelog (diff)
v5: options & downstream, more use of opt.act instead of opt.cmd
* opt.act.*.set==:on instead of opt.cmd =~/\S/
Diffstat (limited to 'lib/sisu/v5/harvest_authors.rb')
-rw-r--r--lib/sisu/v5/harvest_authors.rb11
1 files changed, 7 insertions, 4 deletions
diff --git a/lib/sisu/v5/harvest_authors.rb b/lib/sisu/v5/harvest_authors.rb
index c78971e4..a442df0c 100644
--- a/lib/sisu/v5/harvest_authors.rb
+++ b/lib/sisu/v5/harvest_authors.rb
@@ -197,8 +197,11 @@ module SiSU_HarvestAuthors
file="#{harvest_pth}/authors.#{lng}.html"
end
FileUtils::mkdir_p(harvest_pth) unless FileTest.directory?(harvest_pth)
- fileinfo=(@opt.cmd =~/[vVM]/) ? ("file://#{file}") : ''
- SiSU_Screen::Ansi.new(@opt.cmd,"harvest authors (#{@opt.files.length} files)",fileinfo).dark_grey_title_hi unless @opt.cmd =~/q/
+ fileinfo=(@opt.act[:verbose][:set]==:on \
+ || @opt.act[:verbose_plus][:set]==:on \
+ || @opt.act[:maintenance][:set]==:on) \
+ ? ("file://#{file}") : ''
+ SiSU_Screen::Ansi.new(@opt.act[:color_state][:set],"harvest authors (#{@opt.files.length} files)",fileinfo).dark_grey_title_hi unless @opt.act[:quiet][:set]==:on
@output[lng][:html]=File.new(file,'w')
end
end
@@ -293,7 +296,7 @@ WOK
end
def html_head
@the_idx.keys.each do |lng|
- @output[lng][:html_mnt] << html_head_adjust(lng,'maintenance') if @opt.cmd.inspect =~/M/
+ @output[lng][:html_mnt] << html_head_adjust(lng,'maintenance') if @opt.act[:maintenance][:set]==:on
@output[lng][:html] << html_head_adjust(lng)
end
end
@@ -307,7 +310,7 @@ WOK
end
a=a.join
@the_idx.keys.each do |lng|
- @output[lng][:html_mnt] << a if @opt.cmd.inspect =~/M/
+ @output[lng][:html_mnt] << a if @opt.act[:maintenance][:set]==:on
@output[lng][:html] << a
end
end