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.rb | 33 +++++++++------------------------ 1 file changed, 9 insertions(+), 24 deletions(-) (limited to 'lib/sisu/v0/html.rb') diff --git a/lib/sisu/v0/html.rb b/lib/sisu/v0/html.rb index 5cf8e8d4..39775832 100644 --- a/lib/sisu/v0/html.rb +++ b/lib/sisu/v0/html.rb @@ -71,7 +71,7 @@ module SiSU_HTML require "#{SiSU_lib}/html_promo" include SiSU_HTML_promo require "#{SiSU_lib}/html_tune" - include SiSU_Tune + include SiSU_HTML_Tune require "#{SiSU_lib}/shared_xml" require "#{SiSU_lib}/shared_structure" class Source @@ -152,27 +152,12 @@ module SiSU_HTML end def tuned_file_instructions @tell=SiSU_Screen::Ansi.new(@md.cmd) - if @md - #@md.sfx='' - @md.sfx='' if @md.cmd =~/z/ - if @md.cmd =~/h/ \ - or @md.fns =~/\~[a-z]{2,3}\.s?/ #multilingual document protection is a bit arbitrary, (needed by existing server configuration), add configuration overide... - if @md.cmd =~/H/ \ - and @md.fns =~/\~[a-z]{2,3}\.s?/ - SiSU_Screen::Ansi.new(@md.cmd, - 'multilingual document, creating internal url links with filetype suffix', - "\n\t\t(overriding -H request, using -h mode instead)" - ).warn unless @md.cmd =~/q/ - end - @md.sfx='.html' - end - end @md.cmd=@md.cmd.gsub(/H/,'h') @md.file_type='html' if @md.cmd =~/[hon]/ directories newfilename=%{#{@env.path.output}/#{@md.fnb}/#{@md.fn[:index]}} if @md.file_type =~/html/ dal_array=@particulars.dal_array # dal file drawn here - @tuned_file_array=SiSU_Tune::Tune.new(dal_array,@md).songsheet + @tuned_file_array=SiSU_HTML_Tune::Tune.new(dal_array,@md).songsheet @tuned_file_array end end @@ -353,7 +338,7 @@ WOK title=unless para =~/Document Information/; linkname else link='metadata' - %{#{linkname}} + %{#{linkname}} end toc={} txt_obj={:txt =>title} @@ -456,7 +441,7 @@ WOK para.gsub!(/#{Mx[:id_o]}~0;(?:\w|[0-6]:)\d+;\w\d+#{Mx[:id_c]}#{Mx[:id_o]}#@dp:#@dp#{Mx[:id_c]}$/,'') if para =~/^#{Mx[:lv_o]}4:/ seg_link=para.gsub(/^\s*#{Mx[:lv_o]}4:(\S+?)#{Mx[:lv_c]}\s*(.+?)$/, - %{ + %{ \\2 }) if seg_link =~/(#{Mx[:id_o]}\~\d+;(?:\w|[0-6]:\d+);\w\d+#{Mx[:id_c]}#{Mx[:id_o]}#@dp:#@dp#{Mx[:id_c]})$/m @@ -466,7 +451,7 @@ WOK @@seg_url=para[/^#{Mx[:lv_o]}4:(\S+?)#{Mx[:lv_c]}.+?$/,1] elsif para =~/\d+.\d+.\d+.\d+|\d+.\d+.\d+|\d+.\d+|\d+/ seg_link=para.gsub(/^\s*(#{@md.lv4}\s+)\s*(\d+.\d+.\d+.\d+|\d+.\d+.\d+|\d+.\d+|\d+)(.*)/, - %{\\1 \\2 \\3 }) end p_num=SiSU_HTML_Format::Paragraph_number.new(@md,ocn) if ocn @@ -504,7 +489,7 @@ WOK para.gsub!(m,'') title=linkname else - lnk_n_txt=%{ + lnk_n_txt=%{ #{linkname} } txt_obj={:txt =>lnk_n_txt} @@ -535,7 +520,7 @@ WOK para.gsub!(m,'') title=linkname else - lnk_n_txt=%{ + lnk_n_txt=%{ #{linkname} } txt_obj={:txt =>lnk_n_txt} @@ -593,11 +578,11 @@ WOK toc_shared << format_head_toc.scroll_head_navigation_band if @md.rights rights=format_head_toc.rights - rights=SiSU_Tune::Clean_html.new(rights).clean + rights=SiSU_HTML_Tune::Clean_html.new(rights).clean end if @md.prefix_b prefix_b=format_head_toc.prefix_b - prefix_b=SiSU_Tune::Clean_html.new(prefix_b).clean + prefix_b=SiSU_HTML_Tune::Clean_html.new(prefix_b).clean end @seg_toc_band=format_head_toc.seg_head_navigation_band('pdf') #bug, vary depending on type of doc !! examine @seg_toc_band_bottom=format_head_toc.seg_head_navigation_band_bottom('pdf') #bug, vary depending on type of doc !! examine -- cgit v1.2.3