From 6811ac91f21a434fc7d967c11e1b20f33918c6ea Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Mon, 19 Mar 2012 22:07:29 -0400 Subject: v3: 3.2 branch is main (v3dv --> v3); dev (v3dv) branch directories removed * v3dv (3.2) "merged" into v3 (previously 3.1) (& removed) * conf/sisu/v3dv --> conf/sisu/v3 * data/sisu/v3dv --> data/sisu/v3 * lib/sisu/v3dv --> lib/sisu/v3 * bin/sisu* (v3dv references changed to v3) * (--dev modifier (superfluous for the time being) runs main v3 branch) --- lib/sisu/v3/html_scroll.rb | 59 +++++++++++++++++++++++----------------------- 1 file changed, 30 insertions(+), 29 deletions(-) (limited to 'lib/sisu/v3/html_scroll.rb') diff --git a/lib/sisu/v3/html_scroll.rb b/lib/sisu/v3/html_scroll.rb index c09ae68f..a4d2089e 100644 --- a/lib/sisu/v3/html_scroll.rb +++ b/lib/sisu/v3/html_scroll.rb @@ -56,7 +56,7 @@ ** Description: html scroll generation, processing =end -module SiSU_HTML_scroll +module SiSU_HTML_Scroll require_relative 'shared_html' # shared_html.rb require_relative 'html' # html.rb require_relative 'shared_metadata' # shared_metadata.rb @@ -64,14 +64,14 @@ module SiSU_HTML_scroll class Scroll def initialize(md='',data='',endnotes='') @md,@data,@endnotes=md,data,endnotes - @vz=SiSU_Env::Get_init.instance.skin + @vz=SiSU_Env::GetInit.instance.skin end def songsheet begin - scr=Scroll.new(@md,@data,@endnotes).markup - scr[:tails]=Scroll.new(@md).tails + scr=SiSU_HTML_Scroll::Scroll.new(@md,@data,@endnotes).markup + scr[:tails]=SiSU_HTML_Scroll::Scroll.new(@md).tails scr - rescue; SiSU_Errors::Info_error.new($!,$@,@md.opt.cmd,@md.fns).error + rescue; SiSU_Errors::InfoError.new($!,$@,@md.opt.cmd,@md.fns).error ensure end end @@ -81,14 +81,14 @@ module SiSU_HTML_scroll @rcdc=false @scr={ body: [], metadata: [], owner_details: [] } data.each do |dob| - dob.obj.gsub!(/#{@md.file.output_path.html_seg.rel_image}/m,@md.file.output_path.html_scroll.rel_image) + dob.obj=dob.obj.gsub(/#{@md.file.output_path.html_seg.rel_image}/m,@md.file.output_path.html_scroll.rel_image) if defined? dob.name and dob.name =~/^meta/ \ and dob.obj =~/Document Information/ - dob.obj.gsub!(/(Document Information(?: \(metadata\))?)/,'\1') + dob.obj=dob.obj.gsub(/(Document Information(?: \(metadata\))?)/,'\1') end if dob.obj =~/^Metadata$/ \ and dob.lv =='B' - dob.obj.gsub!(/Metadata/,'') + dob.obj=dob.obj.gsub(/Metadata/,'') end if defined? dob.name \ and dob.name =~/^metadata/ \ @@ -96,17 +96,18 @@ module SiSU_HTML_scroll and dob.obj =~/SiSU Metadata, document information/ @rcdc=true end - dob.obj.gsub!(/href="[a-z0-9._-]+(#\S+?")/m,'href="\1') # internal document links - dob.obj.gsub!(/href="#{Xx[:segment]}/m,'href="') - dob.obj.gsub!(/(?:\s*#{Mx[:br_page]}\s*|\s*#{Mx[:br_page_new]}\s*)+/m,'


') + dob.obj=dob.obj.gsub(/href="[a-z0-9._-]+(#\S+?")/m,'href="\1'). # internal document links + gsub(/href="#{Xx[:segment]}/m,'href="'). + gsub(/(?:\s*#{Mx[:br_page]}\s*|\s*#{Mx[:br_page_new]}\s*)+/m,'


') if dob.obj !~/(^#{Rx[:meta]}|#{Mx[:br_eof]})/ - unless dob.is =~/^code/; dob.obj.gsub!(/(?:#{Mx[:en_a_o]}.+?#{Mx[:en_a_c]}|#{Mx[:en_b_o]}.+?#{Mx[:en_b_c]})\s*/m,' ') + unless dob.is ==:code + dob.obj=dob.obj.gsub(/(?:#{Mx[:en_a_o]}.+?#{Mx[:en_a_c]}|#{Mx[:en_b_o]}.+?#{Mx[:en_b_c]})\s*/m,' ') end if defined? dob.ocn - @p_num=SiSU_HTML_Format::Paragraph_number.new(@md,dob.ocn) + @p_num=SiSU_HTML_Format::ParagraphNumber.new(@md,dob.ocn) end - sto=SiSU_HTML_Format::Format_text_object.new(@md,dob) - para_html=if dob.is=='heading' + sto=SiSU_HTML_Format::FormatTextObject.new(@md,dob) + para_html=if dob.is==:heading x=if dob.ln==1 sto.heading_body1 elsif dob.ln==2 @@ -120,7 +121,7 @@ module SiSU_HTML_scroll elsif dob.ln==6 sto.heading_body6 end - elsif dob.is=='heading_insert' + elsif dob.is==:heading_insert x=if dob.ln==1 sto.heading_body1 elsif dob.ln==2 @@ -137,22 +138,22 @@ module SiSU_HTML_scroll elsif dob.ln==4 \ and dob.obj=='Index' sto.heading_body4 - book_idx=SiSU_Particulars::Combined_singleton.instance.get_idx_html(@md.opt).html_idx + book_idx=SiSU_Particulars::CombinedSingleton.instance.get_idx_html(@md.opt).html_idx book_idx.each do |x| #takes book index prepared for segments and strips segment identifying info - x.gsub!(/(\1(?:-\d+)?)<\/a>/,'\2') + x=x.gsub(/(\1(?:-\d+)?)<\/a>/,'\2') end book_idx.join("\n") #elsif dob.ln==4 \ #and dob.obj=~/Meta/ #p __LINE__ ##and dob.obj=='Metadata' - #metadata=Metadata::Summary.new(@md).xhtml.metadata + #metadata=SiSU_Metadata::Summary.new(@md).xhtml.metadata elsif dob.ln==5 sto.heading_body5 elsif dob.ln==6 sto.heading_body6 end - elsif dob.is=='para' + elsif dob.is==:para if dob.indent \ and dob.hang \ and dob.indent =~/[0-9]/ \ @@ -171,19 +172,19 @@ module SiSU_HTML_scroll end else sto.para end - elsif dob.is=='block' + elsif dob.is==:block sto.block - elsif dob.is=='group' + elsif dob.is==:group sto.group - elsif dob.is=='alt' + elsif dob.is==:alt sto.alt - elsif dob.is=='verse' + elsif dob.is==:verse sto.verse - elsif dob.is=='code' + elsif dob.is==:code sto.code - elsif dob.is=='table' + elsif dob.is==:table sto.table - elsif dob.is=='break' + elsif dob.is==:break sto.break end if dob =~// \ @@ -199,8 +200,8 @@ module SiSU_HTML_scroll end def tails scr_tail=[] - format_head_scroll=SiSU_HTML_Format::Head_toc.new(@md) - ads=SiSU_HTML_promo::Ad.new(@md) + format_head_scroll=SiSU_HTML_Format::HeadToc.new(@md) + ads=SiSU_HTML_Promo::Ad.new(@md) scr_tail << format_head_scroll.scroll_tail << ads.div.close << ads.display << format_head_scroll.html_close scr_tail end -- cgit v1.2.3