From 1323f18af45ea0d3aaef5cd9ead0efb5de8b9729 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Sun, 19 Apr 2015 14:44:38 -0400 Subject: c<-d: sync, roll develop into current dir branch (5==6) * two dir branches, same library contents (v5 synced & updated with v6) --- lib/sisu/current/ao_idx.rb | 25 ++++++++++--------------- 1 file changed, 10 insertions(+), 15 deletions(-) (limited to 'lib/sisu/current/ao_idx.rb') diff --git a/lib/sisu/current/ao_idx.rb b/lib/sisu/current/ao_idx.rb index 0c9c8a43..defad2c3 100644 --- a/lib/sisu/current/ao_idx.rb +++ b/lib/sisu/current/ao_idx.rb @@ -61,8 +61,6 @@ module SiSU_AO_BookIndex @rgx_idx=/#{Mx[:idx_o]}(?:.+?)#{Mx[:idx_c]}\s*/ @rgx_idx_ocn_seg=/(.+?)~(\d+)~(\S+)/ @rgx_idx_ocn=/(.+?)~(\d+)/ - @ocn_html_identifier= - SiSU_Env::ProcessingSettings.new(@md).ocn_html_identifier @env ||=SiSU_Env::InfoEnv.new(@md.fns) end def indexing_song @@ -261,13 +259,13 @@ module SiSU_AO_BookIndex if a[:range] idx[:sst_rel_html_seg][@o]= idx[:sst_rel_html_seg][@o] + - %{#{Mx[:lnk_o]}#{a[:range]}#{Mx[:lnk_c]}#{Mx[:rel_o]}/#{a[:seg]}.html##{@ocn_html_identifier}#{a[:ocn]}#{Mx[:rel_c]}, } + %{#{Mx[:lnk_o]}#{a[:range]}#{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[:range]}#{Mx[:lnk_c]}#{Mx[:rel_o]}#{a[:ocn]}#{Mx[:rel_c]}, } idx[:html][@q]= idx[:html][@q] + - %{#{a[:range]}, } + %{#{a[:range]}, } idx[:xhtml][@q]= idx[:xhtml][@q] + %{#{a[:range]}, } @@ -275,13 +273,13 @@ module SiSU_AO_BookIndex 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##{@ocn_html_identifier}#{a[:ocn]}#{Mx[:rel_c]}, } + %{#{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]}, } + %{#{a[:ocn]}, } idx[:xhtml][@q]= idx[:xhtml][@q] + %{#{a[:ocn]}, } @@ -313,13 +311,13 @@ module SiSU_AO_BookIndex 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##{@ocn_html_identifier}#{z[:ocn]}#{Mx[:rel_c]}, } + %{#{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]}, } + %{#{z[:range]}, } idx[:xhtml][@q]= idx[:xhtml][@q] + %{#{z[:range]}, } @@ -327,13 +325,13 @@ module SiSU_AO_BookIndex 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##{@ocn_html_identifier}#{z[:ocn]}#{Mx[:rel_c]}, } + %{#{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]}, } + %{#{z[:ocn]}, } idx[:xhtml][@q]= idx[:xhtml][@q] + %{#{z[:ocn]}, } @@ -415,12 +413,9 @@ module SiSU_AO_BookIndex tuned_file end def clean_index(data) #check on use of dob - tuned_file=[] - data.each do |para| - para=para.gsub(/\n*#{@rgx_idx}/m,'') - tuned_file << para + data.each.map do |para| + para.gsub(/\n*#{@rgx_idx}/m,'') end - tuned_file end end end -- cgit v1.2.3