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/dal_idx.rb | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'lib/sisu/v5/dal_idx.rb') diff --git a/lib/sisu/v5/dal_idx.rb b/lib/sisu/v5/dal_idx.rb index 86ef06f8..be8a0211 100644 --- a/lib/sisu/v5/dal_idx.rb +++ b/lib/sisu/v5/dal_idx.rb @@ -190,7 +190,7 @@ module SiSU_DAL_BookIndex @t=idx[:sst_rel].index(idx[:sst_rel].last) @q=idx[:html].index(idx[:html].last) @r=idx[:xhtml].index(idx[:xhtml].last) - print "\n" + x + ', ' if @md.opt.cmd =~/V/ + print "\n" + x + ', ' if @md.opt.act[:verbose_plus][:set]==:on elsif x.is_a?(Array) p 'array error? -->' print x @@ -202,13 +202,13 @@ module SiSU_DAL_BookIndex idx[:sst_rel][@t]=idx[:sst_rel][@t] + %{#{Mx[:lnk_o]}#{a[:range]}#{Mx[:lnk_c]}#{Mx[:rel_o]}#{a[:ocn]}#{Mx[:rel_c]}, } idx[:html][@q]=idx[:html][@q] + %{#{a[:range]}, } idx[:xhtml][@q]=idx[:xhtml][@q] + %{#{a[:range]}, } - print a[:range] + ', ' if @md.opt.cmd =~/V/ + print a[:range] + ', ' if @md.opt.act[:verbose_plus][:set]==:on elsif a[:ocn] idx[:sst_rel_html_seg][@o]=idx[:sst_rel_html_seg][@o] + %{#{Mx[:lnk_o]}#{a[:ocn]}#{Mx[:lnk_c]}#{Mx[:rel_o]}#{a[:seg]}.html##{a[:ocn]}#{Mx[:rel_c]}, } idx[:sst_rel][@t]=idx[:sst_rel][@t] + %{#{Mx[:lnk_o]}#{a[:ocn]}#{Mx[:lnk_c]}#{Mx[:rel_o]}#{a[:ocn]}#{Mx[:rel_c]}, } idx[:html][@q]=idx[:html][@q] + %{#{a[:ocn]}, } idx[:xhtml][@q]=idx[:xhtml][@q] + %{#{a[:ocn]}, } - print a[:ocn] + ', ' if @md.opt.cmd =~/V/ + print a[:ocn] + ', ' if @md.opt.act[:verbose_plus][:set]==:on else p 'error' end end @@ -223,20 +223,20 @@ module SiSU_DAL_BookIndex idx[:html][@q]=idx[:html][@q] + %{\n

#{k}, } c=clean_xml(k.dup) idx[:xhtml][@r]=idx[:xhtml][@r] + %{\n

#{c}, } - print "\n\t" + k + ', ' if @md.opt.cmd =~/V/ + print "\n\t" + k + ', ' if @md.opt.act[:verbose_plus][:set]==:on y.each do |z| if z[:range] idx[:sst_rel_html_seg][@o]=idx[:sst_rel_html_seg][@o] + %{#{Mx[:lnk_o]}#{z[:range]}#{Mx[:lnk_c]}#{Mx[:rel_o]}#{z[:seg]}.html##{z[:ocn]}#{Mx[:rel_c]}, } idx[:sst_rel][@t]=idx[:sst_rel][@t] + %{#{Mx[:lnk_o]}#{z[:range]}#{Mx[:lnk_c]}#{Mx[:rel_o]}#{z[:ocn]}#{Mx[:rel_c]}, } idx[:html][@q]=idx[:html][@q] + %{#{z[:range]}, } idx[:xhtml][@q]=idx[:xhtml][@q] + %{#{z[:range]}, } - print z[:range] + ', ' if @md.opt.cmd =~/V/ + print z[:range] + ', ' if @md.opt.act[:verbose_plus][:set]==:on elsif z[:ocn] idx[:sst_rel_html_seg][@o]=idx[:sst_rel_html_seg][@o] + %{#{Mx[:lnk_o]}#{z[:ocn]}#{Mx[:lnk_c]}#{Mx[:rel_o]}#{z[:seg]}.html##{z[:ocn]}#{Mx[:rel_c]}, } idx[:sst_rel][@t]=idx[:sst_rel][@t] + %{#{Mx[:lnk_o]}#{z[:ocn]}#{Mx[:lnk_c]}#{Mx[:rel_o]}#{z[:ocn]}#{Mx[:rel_c]}, } idx[:html][@q]=idx[:html][@q] + %{#{z[:ocn]}, } idx[:xhtml][@q]=idx[:xhtml][@q] + %{#{z[:ocn]}, } - print z[:ocn] + ', ' if @md.opt.cmd =~/V/ + print z[:ocn] + ', ' if @md.opt.act[:verbose_plus][:set]==:on else p 'error' end end @@ -249,7 +249,7 @@ module SiSU_DAL_BookIndex end end end - print "\n" if @md.opt.cmd =~/V/ + print "\n" if @md.opt.act[:verbose_plus][:set]==:on idx end def screen_print(the_idx) -- cgit v1.2.3