From edd89902036bde18c91031470e19c871a182cf6d Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Wed, 23 Oct 2013 23:40:45 -0400 Subject: v5: options & downstream, more use of opt.act instead of opt.cmd * opt.act.*.set==:on instead of opt.cmd =~/\S/ --- lib/sisu/v5/harvest_authors.rb | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'lib/sisu/v5/harvest_authors.rb') 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 -- cgit v1.2.3