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/concordance.rb | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) (limited to 'lib/sisu/v5/concordance.rb') diff --git a/lib/sisu/v5/concordance.rb b/lib/sisu/v5/concordance.rb index 060409b2..3ad394c7 100644 --- a/lib/sisu/v5/concordance.rb +++ b/lib/sisu/v5/concordance.rb @@ -79,23 +79,27 @@ module SiSU_Concordance begin @env,@md=@particulars.env,@particulars.md @env.url.output_tell - unless @md.opt.cmd =~/q/ - tool=(@md.opt.cmd =~/[MVv]/) \ + unless @md.opt.act[:quiet][:set]==:on + tool=(@md.opt.act[:verbose][:set]==:on \ + || @md.opt.act[:verbose_plus][:set]==:on \ + || @md.opt.act[:maintenance][:set]==:on) \ ? "#{@env.program.web_browser} #{@md.file.output_path.html_concordance.dir}/#{@md.file.base_filename.html_concordance}" : "[#{@opt.f_pth[:lng_is]}] #{@opt.fno}" - @md.opt.cmd=~/[MVvz]/ \ - ? SiSU_Screen::Ansi.new(@opt.cmd,"Concordance",tool).green_hi_blue - : SiSU_Screen::Ansi.new(@opt.cmd,'Concordance',tool).green_title_hi + (@md.opt.act[:verbose][:set]==:on \ + || @md.opt.act[:verbose_plus][:set]==:on \ + || @md.opt.act[:maintenance][:set]==:on) \ + ? SiSU_Screen::Ansi.new(@opt.act[:color_state][:set],"Concordance",tool).green_hi_blue + : SiSU_Screen::Ansi.new(@opt.act[:color_state][:set],'Concordance',tool).green_title_hi end wordmax=@env.concord_max unless @md.wc_words.nil? if @md.wc_words < wordmax SiSU_Concordance::Source::Words.new(@particulars).songsheet else - SiSU_Screen::Ansi.new(@md.opt.cmd,"concordance skipped, large document has over #{wordmax} words (#{@md.wc_words})").warn unless @md.opt.cmd =~/q/ + SiSU_Screen::Ansi.new(@md.opt.act[:color_state][:set],"concordance skipped, large document has over #{wordmax} words (#{@md.wc_words})").warn unless @md.opt.act[:quiet][:set]==:on end else - SiSU_Screen::Ansi.new(@md.opt.cmd,"wc (word count) is off, concordance will be processed for all files including those over the max set size of: #{wordmax} words").warn unless @md.opt.cmd =~/q/ + SiSU_Screen::Ansi.new(@md.opt.act[:color_state][:set],"wc (word count) is off, concordance will be processed for all files including those over the max set size of: #{wordmax} words").warn unless @md.opt.act[:quiet][:set]==:on SiSU_Concordance::Source::Words.new(@particulars).songsheet end rescue @@ -365,7 +369,10 @@ WOK # special cases endnotes and header levels 1 - 3 end @file_concordance << %{\n} # footer - SiSU_Screen::Ansi.new(@md.opt.cmd,@md.fns,"#{@md.file.output_path.html_concordance.dir}/#{@md.file.base_filename.html_concordance}").flow if @md.opt.cmd =~/[MV]/ + if @md.opt.act[:verbose_plus][:set]==:on \ + || @md.opt.act[:maintenance][:set]==:on + SiSU_Screen::Ansi.new(@md.opt.act[:color_state][:set],@md.fns,"#{@md.file.output_path.html_concordance.dir}/#{@md.file.base_filename.html_concordance}").flow + end end end end -- cgit v1.2.3