aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v0/html.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sisu/v0/html.rb')
-rw-r--r--lib/sisu/v0/html.rb33
1 files changed, 9 insertions, 24 deletions
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'
- %{<b><a href="#{@md.fnl[:pre]}#{link}#{@md.fnl[:mid]}#{@md.sfx}#{@md.fnl[:post]}">#{linkname}</a></b>}
+ %{<b><a href="#{@md.fnl[:pre]}#{link}#{@md.fnl[:mid]}#{Sfx[:html]}#{@md.fnl[:post]}">#{linkname}</a></b>}
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*(.+?)$/,
- %{ <a href="#{@md.fnl[:pre]}\\1#{@md.fnl[:mid]}#{@md.sfx}#{@md.fnl[:post]}" target="_top">
+ %{ <a href="#{@md.fnl[:pre]}\\1#{@md.fnl[:mid]}#{Sfx[:html]}#{@md.fnl[:post]}" target="_top">
\\2
</a> })
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+)(.*)/,
- %{<a href="#{@md.fnl[:pre]}\\2#{@md.fnl[:mid]}#{@md.sfx}#{@md.fnl[:post]}" } +
+ %{<a href="#{@md.fnl[:pre]}\\2#{@md.fnl[:mid]}#{Sfx[:html]}#{@md.fnl[:post]}" } +
%{target="_top">\\1 \\2 \\3</a> })
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=%{ <a href="#{@md.fnl[:pre]}#{@@seg_url}#{@md.fnl[:mid]}#{@md.sfx}#{@md.fnl[:post]}##{ocn}">
+ lnk_n_txt=%{ <a href="#{@md.fnl[:pre]}#{@@seg_url}#{@md.fnl[:mid]}#{Sfx[:html]}#{@md.fnl[:post]}##{ocn}">
#{linkname}
</a>}
txt_obj={:txt =>lnk_n_txt}
@@ -535,7 +520,7 @@ WOK
para.gsub!(m,'')
title=linkname
else
- lnk_n_txt=%{ <a href="#{@md.fnl[:pre]}#{@@seg_url}#{@md.fnl[:mid]}#{@md.sfx}#{@md.fnl[:post]}##{ocn}">
+ lnk_n_txt=%{ <a href="#{@md.fnl[:pre]}#{@@seg_url}#{@md.fnl[:mid]}#{Sfx[:html]}#{@md.fnl[:post]}##{ocn}">
#{linkname}
</a>}
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