diff options
author | Ralph Amissah <ralph@amissah.com> | 2013-10-23 23:40:45 -0400 |
---|---|---|
committer | Ralph Amissah <ralph@amissah.com> | 2013-10-23 23:40:45 -0400 |
commit | edd89902036bde18c91031470e19c871a182cf6d (patch) | |
tree | 1269e7b1660aa64896fc21768002e837233c2c24 /lib/sisu/v5/dal_idx.rb | |
parent | v4 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/dal_idx.rb')
-rw-r--r-- | lib/sisu/v5/dal_idx.rb | 14 |
1 files changed, 7 insertions, 7 deletions
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 href="#{a[:seg]}.html##{a[:ocn]}">#{a[:range]}</a>, } idx[:xhtml][@q]=idx[:xhtml][@q] + %{<a href="#{a[:seg]}.xhtml#o#{a[:ocn]}">#{a[:range]}</a>, } - 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 href="#{a[:seg]}.html##{a[:ocn]}">#{a[:ocn]}</a>, } idx[:xhtml][@q]=idx[:xhtml][@q] + %{<a href="#{a[:seg]}.xhtml#o#{a[:ocn]}">#{a[:ocn]}</a>, } - 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<p class="book_index_lev2">#{k}, } c=clean_xml(k.dup) idx[:xhtml][@r]=idx[:xhtml][@r] + %{\n<p class="book_index_lev2">#{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] + %{<a href="#{z[:seg]}.html##{z[:ocn]}">#{z[:range]}</a>, } idx[:xhtml][@q]=idx[:xhtml][@q] + %{<a href="#{z[:seg]}.xhtml#o#{z[:ocn]}">#{z[:range]}</a>, } - 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] + %{<a href="#{z[:seg]}.html##{z[:ocn]}">#{z[:ocn]}</a>, } idx[:xhtml][@q]=idx[:xhtml][@q] + %{<a href="#{z[:seg]}.xhtml#o#{z[:ocn]}">#{z[:ocn]}</a>, } - 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) |