From 4e4ce5d362db3e88d41d371645bf998cdead1fbf Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Sat, 4 Jul 2009 08:46:20 -0400 Subject: html various minor: use suffix provided in constants; module SiSU_HTML_Tune; html promo html promo, possibility of use of adsense, or other --- lib/sisu/v0/html_segments.rb | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) (limited to 'lib/sisu/v0/html_segments.rb') diff --git a/lib/sisu/v0/html_segments.rb b/lib/sisu/v0/html_segments.rb index a2d4f849..d874063a 100644 --- a/lib/sisu/v0/html_segments.rb +++ b/lib/sisu/v0/html_segments.rb @@ -102,7 +102,7 @@ module SiSU_HTML_seg class Seg @@seg,@@seg_subtoc,@@seg_endnotes,@@seg_ad={},{},{},{} @@seg_name,@@seg_name_html=[],[] - @@seg_url=@@fn=@@to_lev4=@@get_hash_to=@@get_hash_fn='' + @@seg_url=@@fn=@@get_hash_to=@@get_hash_fn='' @@loop_count=@@seg_total=@@tracker=0 @@is4=@@is3=@@is2=@@is1=0 @@header1=@@header2=@@header3=@@header4=0 @@ -137,9 +137,6 @@ module SiSU_HTML_seg track,tracking,newfile=0,0,0 @@is4=@@is3=@@is2=@@is1=0 printed_endnote_seg='n' - @h_sfx='.php' if @md.file_type =~/php/ - @h_sfx=@md.sfx if @md.file_type =~/html/ - @h_sfx='.html' if @md.file_type =~/html/ #used in creating file, not to be omitted. idx_html=nil if @md.book_idx my_make_source_file=SiSU_Env::Create_file.new(@md.cmd,@md.fns) @@ -196,7 +193,7 @@ module SiSU_HTML_seg if tracking != 0 mkdir_p(@md.dir_out) unless FileTest.directory?(@md.dir_out) #bug - added specifically for nav! not needed by regular seg, check !!! Seg.new('',@md).tail - segfilename="#{@md.dir_out}/#{@md.fnl[:pre]}#{@@seg_name_html[tracking-1]}#{@md.fnl[:mid]}#@h_sfx#{@md.fnl[:post]}" + segfilename="#{@md.dir_out}/#{@md.fnl[:pre]}#{@@seg_name_html[tracking-1]}#{@md.fnl[:mid]}#{Sfx[:html]}#{@md.fnl[:post]}" @output_seg_file=File.new(segfilename,'w') if @@seg_name_html[tracking-1] if @@seg_name_html[tracking-1] !~/endnotes|idx/ Seg_output.new(@md,@output_seg_file,@@seg,@minitoc).output @@ -210,10 +207,10 @@ module SiSU_HTML_seg header_art(para) head(para) if @@seg_name_html[tracking] =~/metadata/ # this is for metadata - segfilename="#{@md.dir_out}/#{@md.fnl[:pre]}#{@@seg_name_html[tracking]}#{@md.fnl[:mid]}#@h_sfx#{@md.fnl[:post]}" + segfilename="#{@md.dir_out}/#{@md.fnl[:pre]}#{@@seg_name_html[tracking]}#{@md.fnl[:mid]}#{Sfx[:html]}#{@md.fnl[:post]}" @output_seg_file=File.new(segfilename,'w') Seg.new.reinitialise #BUG with items following endnote, and occurring before metadata, this becomes a bug ... work area for book index, FIX - flagend="x" + flagend='x' @output_seg_file.close #%(((( EOF )))) --> end end @@ -269,7 +266,7 @@ module SiSU_HTML_seg @author=%{#{@md.author}\n} if @md.author.to_s =~/\S/ @@seg[:tocband_banner] << format_head_seg.navigation_band(@@segtocband,@@seg[:dot_nav]) conditional_div_close=if @@get_hash_fn =~/metadata/ #watch - '' + '' else '' end @@seg[:tocband_bannerless] << conditional_div_close << format_head_seg.navigation_band_bottom(@@segtocband,@@seg[:dot_nav]) @@ -398,7 +395,7 @@ module SiSU_HTML_seg else @sto=nil end if @md.flag_separate_endnotes - para.gsub!(/"\s+href="#_(\d+)">/,%{" href=\"endnotes#{@md.sfx}#_\\1">}) #endnote- twice #removed file type + para.gsub!(/"\s+href="#_(\d+)">/,%{" href=\"endnotes#{Sfx[:html]}#_\\1">}) #endnote- twice #removed file type end if para !~/#{@vz.margin_txt_w1}|#{@vz.margin_txt_w2}/ if para[/(.*)#{Mx[:id_o]}~0;(?:u|[0-6]:)\d+;\w\d+#{Mx[:id_c]}#{Mx[:id_o]}#@dp:#@dp#{Mx[:id_c]}(.*)/] #% watch u & m? @@ -467,11 +464,11 @@ module SiSU_HTML_seg if para !~/^#{Mx[:lv_o]}4:metadata#{Mx[:lv_c]}/ m=para[/^#{Mx[:lv_o]}4:(\S+?)#{Mx[:lv_c]}.+?#{Mx[:id_o]}~(\d+);(?:[oh]|4:)\d+;\w\d+#{Mx[:id_c]}#{Mx[:id_o]}#@dp:#@dp#{Mx[:id_c]}$/] end - if m; @@fn,@@to_lev4=$1,$2 if m # changed 2004w07 #endnotes and sub-tocs + if m; @@fn=$1 if m # changed 2004w07 #endnotes and sub-tocs else if para !~/^#{Mx[:lv_o]}4:metadata#{Mx[:lv_c]}/ m=para[/^#{Mx[:lv_o]}4:(\S+?)#{Mx[:lv_c]}/] - @@fn,@@to_lev4=$1,'nonum' if m # changed 2005w13 + @@fn=$1 if m # changed 2005w13 else @@fn='' end end @@ -525,7 +522,6 @@ module SiSU_HTML_seg endnote_part_a=note_match_seg[m,1] endnote_part_b=note_match_seg[m,2] txt_obj={:endnote_part_a =>endnote_part_a,:endnote_part_b =>endnote_part_b} - format_seg=SiSU_HTML_Format::Format_seg.new(@md,txt_obj) note_match_all_seg=format_seg.endnote_seg_body(@@fn) #BUG WATCH 200408 @@seg[:endnote_all] << note_match_all_seg -- cgit v1.2.3