diff options
author | Ralph Amissah <ralph@amissah.com> | 2011-03-02 22:54:28 -0500 |
---|---|---|
committer | Ralph Amissah <ralph@amissah.com> | 2011-03-02 22:54:28 -0500 |
commit | 0569fd776ab4ce33689ca3337acd62f2415b6348 (patch) | |
tree | 4644037b28d876d8637a610f5df1a29535a4ef9a /lib/sisu/v3/html.rb | |
parent | debian/changelog (3.0.1-1) (diff) | |
parent | CHANGELOG_v{1,2,3}, syslink, avoid duplication (diff) |
Merge branch 'upstream' into debian/sid
Diffstat (limited to 'lib/sisu/v3/html.rb')
-rw-r--r-- | lib/sisu/v3/html.rb | 60 |
1 files changed, 30 insertions, 30 deletions
diff --git a/lib/sisu/v3/html.rb b/lib/sisu/v3/html.rb index bad68cde..47988cba 100644 --- a/lib/sisu/v3/html.rb +++ b/lib/sisu/v3/html.rb @@ -1,4 +1,4 @@ -# coding: utf-8 +# encoding: utf-8 =begin * Name: SiSU @@ -58,19 +58,19 @@ =end module SiSU_HTML require 'pstore' - require "#{SiSU_lib}/particulars" # particulars.rb + require_relative 'particulars' # particulars.rb include SiSU_Particulars - require "#{SiSU_lib}/defaults" # defaults.rb + require_relative 'defaults' # defaults.rb include SiSU_Viz - require "#{SiSU_lib}/html_table" # html_table.rb - require "#{SiSU_lib}/html_format" # html_format.rb + require_relative 'html_table' # html_table.rb + require_relative 'html_format' # html_format.rb include SiSU_HTML_Format - require "#{SiSU_lib}/html_segments" # html_segments.rb + require_relative 'html_segments' # html_segments.rb include SiSU_HTML_seg - require "#{SiSU_lib}/html_scroll" # html_scroll.rb - require "#{SiSU_lib}/html_promo" # html_promo.rb + require_relative 'html_scroll' # html_scroll.rb + require_relative 'html_promo' # html_promo.rb include SiSU_HTML_promo - require "#{SiSU_lib}/html_tune" # html_tune.rb + require_relative 'html_tune' # html_tune.rb include SiSU_HTML_Tune class Source def initialize(opt) @@ -112,7 +112,7 @@ module SiSU_HTML rescue; SiSU_Errors::Info_error.new($!,$@,@opt.cmd,@opt.fns).error ensure unless @opt.cmd =~/[MV]/ #check maintenance flag - texfiles=Dir["#{@env.path.tune}/#{@opt.fns}*"] + texfiles=Dir["#{@env.processing_path.tune}/#{@opt.fns}*"] texfiles.each do |f| if FileTest.file?(f) File.unlink(f) @@ -172,7 +172,7 @@ module SiSU_HTML else '_top' end s_lnk_url,s_lnk_lnk=l[:url],l[:say] - txt_obj={:lnk_url =>s_lnk_url,:lnk_txt =>s_lnk_lnk,:target =>target} + txt_obj={ lnk_url: s_lnk_url, lnk_txt: s_lnk_lnk, target: target } lev_dob_ocn=SiSU_HTML_Format::Format_toc.new(@md,txt_obj) @links_guide_toc << lev_dob_ocn.links_guide if s_lnk_lnk end @@ -208,7 +208,7 @@ module SiSU_HTML endnote_array = pg.obj.scan(/#{Mx[:en_b_o]}[\d+]+(.+?)#{Mx[:en_b_c]}/m) end endnote_array.flatten.each do |note| - txt_obj={:txt =>note} + txt_obj={ txt: note } format_scroll=SiSU_HTML_Format::Format_scroll.new(@md,txt_obj) @scr_endnotes << format_scroll.endnote_body end @@ -219,7 +219,7 @@ module SiSU_HTML end end class Toc <Links_guide - @@toc={ :seg=>[],:seg_mini=>[],:scr=>[] } + @@toc={ seg: [], seg_mini: [], scr: [] } @@seg_url='' @@firstseg=nil def initialize(md=nil,data='') @@ -231,7 +231,7 @@ module SiSU_HTML SiSU_Screen::Ansi.new(@md.cmd,'Toc').txt_grey if @md.cmd =~/[MVv]/ toc=nil @@firstseg=nil - @@toc={ :seg=>[],:seg_mini=>[],:scr=>[] } + @@toc={ seg: [], seg_mini: [], scr: [] } @data.each do |dob| if dob.is=='heading' \ or dob.is=='heading_insert' @@ -325,7 +325,7 @@ WOK %{<b><a href="#{@md.fnl[:pre]}#{link}#{@md.fnl[:mid]}#{Sfx[:html]}#{@md.fnl[:post]}">#{linkname}</a></b>} end toc={} - txt_obj={:txt =>title} + txt_obj={ txt: title } format_toc=SiSU_HTML_Format::Format_toc.new(@md,txt_obj) toc[:seg]=if dob.name =~/^meta/ \ and dob.obj =~/Document Information/ @@ -353,7 +353,7 @@ WOK end %{<b><a href="##{link}">#{linkname}</a></b>} end - txt_obj={:txt =>title} + txt_obj={ txt: title } format_toc=SiSU_HTML_Format::Format_toc.new(@md,txt_obj) toc[:scr]=if dob.name =~/^meta/ \ and dob.obj =~/Document Information/ @@ -370,14 +370,14 @@ WOK SiSU_HTML_Format::Paragraph_number.new(@md,ocn) else nil end - txt_obj={:txt =>linkname} + txt_obj={ txt: linkname } format_toc=SiSU_HTML_Format::Format_toc.new(@md,txt_obj) toc={} toc[:seg]=format_toc.lev2 toc[:seg_mini]=format_toc.mini_lev2 if p_num title=%{#{p_num.goto}#{linkname}</a>} - txt_obj={:txt =>title} + txt_obj={ txt: title } format_toc=SiSU_HTML_Format::Format_toc.new(@md,txt_obj) toc[:scr]=format_toc.lev2 end @@ -391,14 +391,14 @@ WOK SiSU_HTML_Format::Paragraph_number.new(@md,ocn) else nil end - txt_obj={:txt =>linkname} + txt_obj={ txt: linkname } format_toc=SiSU_HTML_Format::Format_toc.new(@md,txt_obj) toc={} toc[:seg]=format_toc.lev3 toc[:seg_mini]=format_toc.mini_lev3 if p_num title=%{#{p_num.goto}#{linkname}</a>} - txt_obj={:txt =>title} + txt_obj={ txt: title } format_toc=SiSU_HTML_Format::Format_toc.new(@md,txt_obj) toc[:scr]=format_toc.lev3 end @@ -426,8 +426,8 @@ WOK seg_link.gsub(/sisu_manifest\.html/,"../../manifest/#{@file.base_filename.manifest}") else seg_link end - {:txt =>man_link} - else {:txt =>seg_link} + { txt: man_link } + else { txt: seg_link } end format_toc=SiSU_HTML_Format::Format_toc.new(@md,txt_obj) toc={} @@ -436,8 +436,8 @@ WOK title=%{#{p_num.goto}#{linkname}</a>} if p_num txt_obj=if title=~/sisu_manifest.html/ man_link=title.gsub(/sisu_manifest.html/,"../manifest/#{@file.base_filename.manifest}") - {:txt =>man_link} - else {:txt =>title} + { txt: man_link } + else { txt: title } end format_toc=SiSU_HTML_Format::Format_toc.new(@md,txt_obj) toc[:scr]=format_toc.lev4 @@ -454,12 +454,12 @@ WOK 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} + txt_obj={ txt: lnk_n_txt } format_toc=SiSU_HTML_Format::Format_toc.new(@md,txt_obj) toc[:seg]=format_toc.lev5 toc[:seg_mini]=format_toc.mini_lev5 title=%{#{p_num.goto}#{linkname}</a>} - txt_obj={:txt =>title} + txt_obj={ txt: title } format_toc=SiSU_HTML_Format::Format_toc.new(@md,txt_obj) toc[:scr]=format_toc.lev5 end @@ -475,12 +475,12 @@ WOK 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} + txt_obj={ txt: lnk_n_txt } format_toc=SiSU_HTML_Format::Format_toc.new(@md,txt_obj) toc[:seg]=format_toc.lev6 toc[:seg_mini]=format_toc.mini_lev6 title=%{#{p_num.goto}#{linkname}</a>} - txt_obj={:txt =>title} + txt_obj={ txt: title } format_toc=SiSU_HTML_Format::Format_toc.new(@md,txt_obj) toc[:scr]=format_toc.lev6 end @@ -542,14 +542,14 @@ WOK tmp_head=nil doc_title_endnote=@md.title.full.gsub(/(\*+)/,'<sup><a href="#endnotes">\1</a></sup>') tmp_head=doc_title_endnote + "\n" - txt_obj={:txt =>tmp_head} + txt_obj={ txt: tmp_head } format_txt_obj=SiSU_HTML_Format::Format_text_object.new(@md,txt_obj) toc_shared << format_txt_obj.center_bold @segtoc << format_txt_obj.center_bold if defined? @md.creator.author creator_endnote=@md.creator.author.gsub(/(\*+)/,%{ <sup><a href="#notes">\\1</a></sup>}) tmp_head=creator_endnote + "\n" - txt_obj={:txt =>tmp_head} + txt_obj={ txt: tmp_head } format_txt_obj=SiSU_HTML_Format::Format_text_object.new(@md,txt_obj) toc_shared << format_txt_obj.center_bold @segtoc << format_txt_obj.center_bold |