From 145f3092505f614ca5c81a4cbcfea9f22329e745 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Fri, 3 Feb 2012 20:02:32 -0500 Subject: v3 v3dv: path & url links, updates for multiple output directory structures --- lib/sisu/v3/concordance.rb | 2 +- lib/sisu/v3/dal_doc_str.rb | 213 ----------------------------- lib/sisu/v3/epub_concordance.rb | 5 +- lib/sisu/v3/epub_format.rb | 277 +------------------------------------ lib/sisu/v3/epub_segments.rb | 24 +--- lib/sisu/v3/html.rb | 2 +- lib/sisu/v3/html_format.rb | 64 ++------- lib/sisu/v3/manpage.rb | 2 +- lib/sisu/v3/odf.rb | 6 +- lib/sisu/v3/plaintext.rb | 6 +- lib/sisu/v3/shared_metadata.rb | 2 +- lib/sisu/v3/texpdf_format.rb | 10 -- lib/sisu/v3/update.rb | 32 +++-- lib/sisu/v3/xhtml.rb | 7 +- lib/sisu/v3/xml_format.rb | 195 -------------------------- lib/sisu/v3dv/concordance.rb | 2 +- lib/sisu/v3dv/dal_doc_str.rb | 221 +----------------------------- lib/sisu/v3dv/db_import.rb | 78 ++++++----- lib/sisu/v3dv/epub_concordance.rb | 9 +- lib/sisu/v3dv/epub_format.rb | 281 +------------------------------------- lib/sisu/v3dv/epub_segments.rb | 34 +---- lib/sisu/v3dv/html.rb | 2 +- lib/sisu/v3dv/html_format.rb | 64 ++------- lib/sisu/v3dv/manpage.rb | 2 +- lib/sisu/v3dv/odf.rb | 6 +- lib/sisu/v3dv/plaintext.rb | 6 +- lib/sisu/v3dv/shared_metadata.rb | 2 +- lib/sisu/v3dv/texinfo_format.rb | 1 - lib/sisu/v3dv/texpdf_format.rb | 10 -- lib/sisu/v3dv/update.rb | 32 +++-- lib/sisu/v3dv/xhtml.rb | 7 +- lib/sisu/v3dv/xml_format.rb | 195 -------------------------- 32 files changed, 160 insertions(+), 1639 deletions(-) (limited to 'lib') diff --git a/lib/sisu/v3/concordance.rb b/lib/sisu/v3/concordance.rb index a94531b6..96101585 100644 --- a/lib/sisu/v3/concordance.rb +++ b/lib/sisu/v3/concordance.rb @@ -115,7 +115,7 @@ module SiSU_Concordance @fnb=@md.fnb @lex_button=%{SiSU home -->} @doc_details =< 

#{@md.title.full}

#{@md.author}

+
 

#{@md.title.full}

#{@md.author}

WOK end def create diff --git a/lib/sisu/v3/dal_doc_str.rb b/lib/sisu/v3/dal_doc_str.rb index c7d3087c..7bc36e11 100644 --- a/lib/sisu/v3/dal_doc_str.rb +++ b/lib/sisu/v3/dal_doc_str.rb @@ -528,219 +528,6 @@ module SiSU_document_structure_extract h={ obj: str, ocn_: false } SiSU_document_structure::Object_para.new.paragraph(h) end - def metadata - meta=[] - dir=SiSU_Env::Info_env.new(@md.fns) - base_html="#{dir.url.root}/#{@md.fnb}" - l=SiSU_Env::Standardise_language.new(@md.opt.lng).language - language=l[:n] - tr=SiSU_Translate::Source.new(@md,language) - meta << @pb - h={ ln: 2, obj: 'Metadata', ocn_: false } - meta << SiSU_document_structure::Object_heading.new.heading(h) - h={ ln: 4, name: 'metadata', obj: 'Metadata', autonum_: false, ocn_: false } - meta << SiSU_document_structure::Object_heading.new.heading(h) #add ocnm - s="Document Manifest @\n #{base_html}/#{@md.fn[:manifest]}" - meta << meta_para(s) - s="#{Mx[:fa_bold_o]}Dublin Core#{Mx[:fa_bold_c]} (DC)" #add ocnm - meta << meta_para(s) - s="#{Mx[:fa_italics_o]}DC tags included with this document are provided here.#{Mx[:fa_italics_c]}" #add ocnm - meta << meta_para(s) - if defined? @md.title.full \ - and @md.title.full=~/\S+/ - s="#{tr.full_title}: #{Mx[:fa_underscore_o]}#{@md.title.full}#{Mx[:fa_underscore_c]}" - meta << meta_para(s) - end - if defined? @md.creator.author \ - and @md.creator.author=~/\S+/ - s="\n#{tr.author}: #{Mx[:fa_underscore_o]}#{@md.creator.author}#{Mx[:fa_underscore_c]}" - meta << meta_para(s) - end - if defined? @md.creator.translator \ - and @md.creator.translator=~/\S+/ - s="#{tr.translator}: #{Mx[:fa_underscore_o]}#{@md.creator.translator}#{Mx[:fa_underscore_c]}" - meta << meta_para(s) - end - if defined? @md.creator.illustrator \ - and @md.creator.illustrator=~/\S+/ - s="#{tr.illustrator}: #{Mx[:fa_underscore_o]}#{@md.creator.illustrator}#{Mx[:fa_underscore_c]}" - meta << meta_para(s) - end - if defined? @md.creator.prepared_by \ - and @md.creator.prepared_by=~/\S+/ - s="\n#{tr.prepared_by}: #{Mx[:fa_underscore_o]}#{@md.creator.prepared_by}#{Mx[:fa_underscore_c]}" - meta << meta_para(s) - end - if defined? @md.creator.digitized_by \ - and @md.creator.digitized_by=~/\S+/ - s="#{tr.digitized_by}: #{Mx[:fa_underscore_o]}#{@md.creator.digitized_by}#{Mx[:fa_underscore_c]}" - meta << meta_para(s) - end - if defined? @md.rights.all \ - and @md.rights.all=~/\S+/ - s="\n#{tr.rights}: #{Mx[:fa_underscore_o]}#{@md.rights.all}#{Mx[:fa_underscore_c]}" - meta << meta_para(s) - end - if defined? @md.notes.description \ - and @md.notes.description=~/\S+/ - s="#{tr.description}: #{Mx[:fa_underscore_o]}#{@md.notes.description}#{Mx[:fa_underscore_c]}" - meta << meta_para(s) - end - if defined? @md.classify.subject \ - and @md.classify.subject=~/\S+/ - s="#{tr.subject}: #{Mx[:fa_underscore_o]}#{@md.classify.subject}#{Mx[:fa_underscore_c]}" - meta << meta_para(s) - end - if defined? @md.publisher \ - and @md.publisher=~/\S+/ - s="\n#{tr.publisher}: #{Mx[:fa_underscore_o]}#{@md.publisher}#{Mx[:fa_underscore_c]}" - meta << meta_para(s) - end - if defined? @md.creator.contributor \ - and @md.creator.contributor=~/\S+/ - s="\n#{tr.contributor}: #{Mx[:fa_underscore_o]}#{@md.creator.contributor}#{Mx[:fa_underscore_c]}" - meta << meta_para(s) - end - if defined? @md.notes.abstract \ - and @md.notes.abstract=~/\S+/ - s="\n#{tr.abstract}: #{Mx[:fa_underscore_o]}#{@md.notes.abstract}#{Mx[:fa_underscore_c]}" - meta << meta_para(s) - end - if defined? @md.date.created \ - and @md.date.created=~/\S+/ - s="\n#{tr.date_created}: #{Mx[:fa_underscore_o]}#{@md.date.created}#{Mx[:fa_underscore_c]}" - meta << meta_para(s) - end - if defined? @md.date.issued \ - and @md.date.issued=~/\S+/ - s="\n#{tr.date_issued}: #{Mx[:fa_underscore_o]}#{@md.date.issued}#{Mx[:fa_underscore_c]}" - meta << meta_para(s) - end - if defined? @md.date.available \ - and @md.date.available=~/\S+/ - s="\n#{tr.date_available}: #{Mx[:fa_underscore_o]}#{@md.date.available}#{Mx[:fa_underscore_c]}" - meta << meta_para(s) - end - if defined? @md.date.modified \ - and @md.date.modified=~/\S+/ - s="\n#{tr.date_modified}: #{Mx[:fa_underscore_o]}#{@md.date.modified}#{Mx[:fa_underscore_c]}" - meta << meta_para(s) - end - if defined? @md.date.valid \ - and @md.date.valid=~/\S+/ - s="\n#{tr.date_valid}: #{Mx[:fa_underscore_o]}#{@md.date.valid}#{Mx[:fa_underscore_c]}" - meta << meta_para(s) - end - if defined? @md.date.published \ - and @md.date.published=~/\S+/ - s="\n#{tr.date}: #{Mx[:fa_underscore_o]}#{@md.date.published}#{Mx[:fa_underscore_c]}" - meta << meta_para(s) - end - if defined? @md.classify.loc \ - and @md.classify.loc=~/\S+/ - s="\n#{tr.cls_loc}: #{Mx[:fa_underscore_o]}#{@md.classify.loc}#{Mx[:fa_underscore_c]}" - meta << meta_para(s) - end - if defined? @md.classify.dewey \ - and @md.classify.dewey=~/\S+/ - s="\n#{@cls_dewey}: #{Mx[:fa_underscore_o]}#{@md.classify.dewey}#{Mx[:fa_underscore_c]}" - meta << meta_para(s) - end - if defined? @md.classify.pg \ - and @md.classify.pg=~/\S+/ - s="\n#{tr.cls_gutenberg}: #{Mx[:fa_underscore_o]}#{@md.classify.pg}#{Mx[:fa_underscore_c]}" - meta << meta_para(s) - end - if defined? @md.classify.isbn \ - and @md.classify.isbn=~/\S+/ - s="\n#{tr.cls_isbn}: #{Mx[:fa_underscore_o]}#{@md.classify.isbn}#{Mx[:fa_underscore_c]}" - meta << meta_para(s) - end - if defined? @md.notes.comment \ - and @md.notes.comment=~/\S+/ - s="\n#{tr.comments}: #{Mx[:fa_underscore_o]}#{@md.notes.comment}#{Mx[:fa_underscore_c]}" - meta << meta_para(s) - end - if defined? @md.notes.prefix_a \ - and @md.notes.prefix_a=~/\S+/ - s="\n#{tr.prefix_a}: #{Mx[:fa_underscore_o]}#{@md.notes.prefix_a}#{Mx[:fa_underscore_c]}" - meta << meta_para(s) - end - if defined? @md.notes.prefix_b \ - and @md.notes.prefix_b=~/\S+/ - s="\n#{tr.prefix_b}: #{Mx[:fa_underscore_o]}#{@md.notes.prefix_b}#{Mx[:fa_underscore_c]}" - meta << meta_para(s) - end - if defined? @md.classify.identifier \ - and @md.classify.identifier=~/\S+/ - s="\n#{tr.identifier}: #{Mx[:fa_underscore_o]}#{@md.classify.identifier}#{Mx[:fa_underscore_c]}" - meta << meta_para(s) - end - if defined? @md.original.source \ - and @md.original.source=~/\S+/ - s="\n#{tr.source}: #{Mx[:fa_underscore_o]}#{@md.original.source}#{Mx[:fa_underscore_c]}" - meta << meta_para(s) - end - if defined? @md.title.language \ - and @md.title.language=~/\S+/ - s="\n#{tr.language}: #{Mx[:fa_underscore_o]}#{@md.title.language}#{Mx[:fa_underscore_c]}" - meta << meta_para(s) - end - if defined? @md.original.language \ - and @md.original.language=~/\S+/ - s="\n#{tr.language_original}: #{Mx[:fa_underscore_o]}#{@md.original.language}#{Mx[:fa_underscore_c]}" - meta << meta_para(s) - end - if defined? @md.classify.format \ - and @md.classify.format=~/\S+/ - s="\n#{tr.format}: #{Mx[:fa_underscore_o]}#{@md.classify.format}#{Mx[:fa_underscore_c]}" - meta << meta_para(s) - end - if defined? @md.classify.relation \ - and @md.classify.relation=~/\S+/ - s="\n#{tr.relation}: #{Mx[:fa_underscore_o]}#{@md.classify.relation}#{Mx[:fa_underscore_c]}" - meta << meta_para(s) - end - if defined? @md.classify.coverage \ - and @md.classify.coverage=~/\S+/ - s="\n#{tr.coverage}: #{Mx[:fa_underscore_o]}#{@md.classify.coverage}#{Mx[:fa_underscore_c]}" - meta << meta_para(s) - end - if defined? @md.classify.keywords \ - and @md.classify.keywords=~/\S+/ - s="\n#{tr.keywords}: #{Mx[:fa_underscore_o]}#{@md.classify.keywords}#{Mx[:fa_underscore_c]}" - meta << meta_para(s) - end - s="#{Mx[:fa_bold_o]}Version Information#{Mx[:fa_bold_c]}" - meta << meta_para(s) - if defined? @md.fns \ - and @md.fns=~/\S+/ - s="#{tr.sourcefile}: #{Mx[:fa_underscore_o]}#{@md.fns}#{Mx[:fa_underscore_c]}" - meta << meta_para(s) - end - if defined? @md.file_encoding \ - and @md.file_encoding=~/\S+/ - s="Filetype: #{Mx[:fa_underscore_o]}#{@md.file_encoding}#{Mx[:fa_underscore_c]}" - meta << meta_para(s) - end - if defined? @md.dgst \ - and @md.dgst.class==Array - s="Source Digest: #{@md.dgst[0]} #{Mx[:fa_underscore_o]}#{@md.dgst[1]}#{Mx[:fa_underscore_c]}" - meta << meta_para(s) - end - if defined? @md.dgst_skin \ - and @md.dgst_skin.class==Array - s="Skin Digest: #{@md.dgst_skin[0]} #{Mx[:fa_underscore_o]}#{@md.dgst_skin[1]}#{Mx[:fa_underscore_c]}" - meta << meta_para(s) - end - s="#{Mx[:fa_bold_o]}Generated#{Mx[:fa_bold_c]}" - meta << meta_para(s) - s="#{tr.last_generated}: #{Mx[:fa_underscore_o]}#{Time.now}#{Mx[:fa_underscore_c]}" - meta << meta_para(s) - s="#{tr.sisu_version}: #{Mx[:fa_underscore_o]}#{@md.sisu_version[:project]}#{Mx[:fa_underscore_c]} #{Mx[:fa_underscore_o]}#{@md.sisu_version[:version]}#{Mx[:fa_underscore_c]} of #{@md.sisu_version[:date_stamp]} (#{@md.sisu_version[:date]})" - meta << meta_para(s) - meta - end def build_lines(type='') data=@data data.each do |line| diff --git a/lib/sisu/v3/epub_concordance.rb b/lib/sisu/v3/epub_concordance.rb index 66864775..c2a289a2 100644 --- a/lib/sisu/v3/epub_concordance.rb +++ b/lib/sisu/v3/epub_concordance.rb @@ -74,9 +74,6 @@ module SiSU_EPUB_Concordance def read begin @env,@md=@particulars.env,@particulars.md - loc=@env.url.output_tell - tool=((@md.opt.cmd =~/[MVv]/) ? "#{@env.program.web_browser} #{loc}/#{@md.fnb}/#{@md.fn[:concordance]}" : '') - SiSU_Screen::Ansi.new(@md.opt.cmd,"Concordance",tool).grey_title_hi unless @md.opt.cmd =~/q/ wordmax=@env.concord_max unless @md.wc_words.nil? if @md.wc_words < wordmax @@ -106,7 +103,7 @@ module SiSU_EPUB_Concordance @fnb=@md.fnb @lex_button=%{SiSU home -->} @doc_details =< 

#{@md.title.full}

#{@md.creator.author}

+
 

#{@md.title.full}

#{@md.creator.author}

WOK end def create diff --git a/lib/sisu/v3/epub_format.rb b/lib/sisu/v3/epub_format.rb index 40fe8816..31bae51b 100644 --- a/lib/sisu/v3/epub_format.rb +++ b/lib/sisu/v3/epub_format.rb @@ -1718,50 +1718,12 @@ WOK } end end - class Widget < Head_information - def initialize(md) - super(md) - @md=md - @cf_defaults=SiSU_Env::Info_processing_flag.new - end - def home - %{ - - #{@vz.png_homepage} - -} - end - def search - env=SiSU_Env::Info_env.new(@md.fns,@md) - env.widget.search_form('sisusearch',nil,nil,true) - end - def manifest - %{ - - #{@vz.nav_txt_manifest} - -} - end - end - class XML - end class Head_toc < Head_information def initialize(md) super(md) @md=md @tocband_segtoc=make_seg end - def concordance_navigation_band(type='') - if type=~/pdf/ - @tocband_concordance=make_concordance - end - %{

- - #{@vz.epub_png_nav_toc} - -

-} - end def seg_head_navigation_band firstseg=%{ #{@vz.epub_png_nav_nxt} @@ -1778,30 +1740,17 @@ WOK ? '' : %{

#{firstseg}

} end - def manifest_link(text) #watch fix removed font size 2 - %{
#{text}} + def manifest_link(text) + %{ #{text}} end def concordance_link(text) #watch fix removed font size 2 if @md.concord_make - %{ + %{ #{text} } else '' end end - def make_concordance - manifest=scroll=seg='' - wgt=Widget.new(@md) - %{ - - #{wgt.seg(@vz.nav_txt_toc_link)}#{wgt.scroll(@vz.nav_txt_doc_link)}#{wgt.pdf}#{wgt.odf} -
- #{wgt.concordance(@vz.nav_txt_concordance)} - #{wgt.manifest} - #{wgt.search} - #{wgt.home} -
} - end def head %{#{doc_type} @@ -1815,7 +1764,7 @@ WOK if @md.concord_make %{#{@vz.margin_css}

- + Concordance

@@ -1879,10 +1828,6 @@ WOK #{@vz.table_close}} end - def seg_metadata - @metalink=%{./#{@md.fn[:metadata]}} - metadata - end end class Head_seg < Head_information def initialize(md) @@ -1896,225 +1841,15 @@ WOK #{@md.html_title} -#{@vz.font_css_table_file} +#{@css.xhtml_epub} -#{@vz.color_body} -#{@vz.js_top}} - end - def title_banner(title,subtitle,creator) - end - def dot_control_pre_next - %{ - - -
- - #{@vz.png_nav_dot_pre} - - - - #{@vz.png_nav_dot_toc} - - - - #{@vz.png_nav_dot_nxt} - -#{@vz.table_close}} - end - def dot_control_pre - %{ - - -
- - #{@vz.png_nav_dot_pre} - - - - #{@vz.png_nav_dot_toc} - - - - #{@vz.png_nav_dot_nxt} - -#{@vz.table_close}} - end - def toc_nav(f_pre=false,f_nxt=false,use=1) - pre=nxt='' - toc=%{ - #{@vz.epub_png_nav_toc} - -} - pre=%{ - #{@vz.epub_png_nav_pre} - -} if f_pre==true - nxt=%{ - #{@vz.epub_png_nav_nxt} - -} if f_nxt==true - DISABLE[:epub][:internal_navigation] \ - ? '' - : %{

-#{pre} -#{toc} -#{nxt} -

-} - end - def toc_next2 - pre,nxt=false,true - toc_nav(false,true).dup - end - def toc_pre_next2 - toc_nav(true,true).dup - end - def toc_pre2 - toc_nav(true,false).dup - end - def manifest_link(text) - %{ - #{text} - } - end - def concordance_link(text) - if @md.concord_make - %{ - #{text} - } - else '' - end - end - def doc_types #used in seg_nav_band ### - scroll=seg='' - wgt=Widget.new(@md) - x=if @md.concord_make - %{ - - - #{wgt.seg(@vz.nav_txt_toc_link)} - #{wgt.scroll(@vz.nav_txt_doc_link)} - #{wgt.pdf}#{wgt.odf} -
- #{wgt.concordance(@vz.nav_txt_concordance)} - #{wgt.manifest} - #{wgt.search} - #{wgt.home} -
} - else - %{ - - - #{wgt.seg(@vz.nav_txt_toc_link)} - #{wgt.scroll(@vz.nav_txt_doc_link)} - #{wgt.pdf}#{wgt.odf} -
- #{wgt.manifest} - #{wgt.search} - #{wgt.home} -
} - end - end - def navigation_table - %{ -
- - - } - end - def navigation_table1 - %{ -
- } - end - def navigation_table2 - %{ -
- } - end - def heading_advert_local_1 - dir=SiSU_Env::Info_env.new(@fns) - %{

- -
- - #{@md.ad_alt} - -#{@vz.table_close} -

} - end - def heading_advert_local_2 - dir=SiSU_Env::Info_env.new(@fns) - %{

- - -} - end - def search - env=SiSU_Env::InfoEnv.new(@md.fns,@md) - env.widget.search_form('sisusearch',nil,nil,true) - end - def manifest - %{} - end - end - class XML - end class HeadToc < HeadInformation def initialize(md) super(md) @md=md @tocband_segtoc=make_seg end - def concordance_navigation_band(type='') - if type=~/pdf/ - @tocband_concordance=make_concordance - end - %{

- - #{@vz.epub_png_nav_toc} - -

-} - end def seg_head_navigation_band firstseg=%{ #{@vz.epub_png_nav_nxt} @@ -1778,30 +1740,17 @@ WOK ? '' : %{

#{firstseg}

} end - def manifest_link(text) #watch fix removed font size 2 - %{
#{text}} + def manifest_link(text) + %{ #{text}} end - def concordance_link(text) #watch fix removed font size 2 + def concordance_link(text) if @md.concord_make - %{ + %{ #{text} } else '' end end - def make_concordance - manifest=scroll=seg='' - wgt=SiSU_EPUB_Format::Widget.new(@md) - %{
- - #{@md.ad_alt} - -#{@vz.table_close} -

} - end - def heading_advert_external - dir=SiSU_Env::Info_env.new(@fns) - %{

- - @@ -253,7 +253,7 @@ module SiSU_HTML_Format if @md.concord_make \ and @md.wc_words < 300000 #max word count for display of concordance here as would now be a large file %{} @@ -336,13 +336,13 @@ WOK def manifest_link(text) # @file=SiSU_Env::SiSU_file.new(@md) if @md %{ - #{text} + #{text} } end def concordance_link(text) if @md.concord_make %{ - + #{text} } @@ -406,7 +406,7 @@ WOK if @md.concord_make %{#{@vz.margin_css}

- + Concordance

@@ -431,7 +431,7 @@ WOK Quick Ref.:
  • - + Manifest
  • @@ -452,7 +452,7 @@ WOK Quick Ref.:
  • - + Manifest
  • @@ -553,10 +553,6 @@ WOK #{@vz.table_close}} end - def seg_metadata - @metalink=%{./#{@md.fn[:metadata]}} - metadata - end def seg_tail %{
    @@ -625,24 +621,6 @@ WOK def initialize(md) #(md='') super(md) end - def head - rdf=SiSU_XML_tags::RDF.new(@md) - %{#{doc_type} - - - #{@seg_name_html[@seg_name_html_tracker]} - - #{@md.html_title} - - -#{rdf.metatag_html} -#{@vz.font_css_table_file} - -#{@vz.color_body} - - - -#{@vz.js_top}} - end def title_banner(title,subtitle,creator) end def dot_control_pre_next @@ -676,7 +654,7 @@ WOK def dot_control_pre pre="#{@seg_name_html[@seg_name_html_tracker-2]}#{@md.lang_code_insert}#{Sfx[:html]}" up="#{@toc}#{@md.lang_code_insert}#{Sfx[:html]}" - nxt="#{@md.fn[:toc]}" + nxt="#{@md.file.base_filename.html_segtoc}" %{
    - - #{@md.ad_alt} - -#{@vz.table_close} -

    } - end - def navigation_band(segtocband) #change name to navigaion_band_banner - %{#{segtocband} -} - end - def navigation_band_bottom(segtocband,seg_table_top_control) #change name to navigaion_band_bannerless - %{ -
    - - - -
    - #{doc_types} - - #{segtocband} -
    - #{seg_table_top_control} -
    -} +#{@vz.color_body}} end def endnote_mark %{
    } end - def endnote_section_open -%{ -
    -} - end - def endnote_section_close -%{ -
    -} #revisit - end - def head - %{#{doc_type} - - - #{@seg_name_xhtml[@seg_name_xhtml_tracker]} - - #{@md.html_title} - - -#{@css.xhtml_epub} - -#{@vz.color_body}} - end - def toc_metadata - @metalink=%{./#{@md.fn[:metadata]}} - toc_metadata - end def title_banner(title,subtitle,creator) end end diff --git a/lib/sisu/v3/epub_segments.rb b/lib/sisu/v3/epub_segments.rb index 6ad278f4..5e08968a 100644 --- a/lib/sisu/v3/epub_segments.rb +++ b/lib/sisu/v3/epub_segments.rb @@ -70,8 +70,6 @@ module SiSU_EPUB_seg filename_seg << @seg[:title] << @seg[:nav] if @type=='endnotes' @seg[:headings]=[] - format_head_seg=SiSU_EPUB_Format::Head_seg.new(@md) - @seg[:headings] << format_head_seg.title_banner(@md.title.main,@md.title.sub,@author) txt_obj={ txt: 'Endnotes', ocn_display: ''} format_seg=SiSU_EPUB_Format::Format_seg.new(@md,txt_obj) @seg[:headings] << format_seg.title_heading1 @@ -79,8 +77,6 @@ module SiSU_EPUB_seg elsif @type=='idx' @seg[:headings]=[] format_head_seg=SiSU_EPUB_Format::Head_seg.new(@md) - @seg[:headings] << format_head_seg.title_banner(@md.title.main,@md.title.sub,@author) - txt_obj={ txt: 'Index', ocn_display: ''} format_seg=SiSU_EPUB_Format::Format_seg.new(@md,txt_obj) @seg[:headings] << format_seg.title_heading1 filename_seg << @seg[:heading_idx] << @seg[:headings] << %{\n
    \n} << @seg[:idx] << '
    ' @@ -132,10 +128,9 @@ WOK @@loop_count=@@seg_total=@@tracker=0 @@is4=@@is3=@@is2=@@is1=0 @@heading1=@@heading2=@@heading3=@@heading4=0 - @@seg[:nav],@@seg[:title],@@seg[:headings],@@seg[:main],@@seg[:idx],@@seg[:tail],@@seg_subtoc_array,@@seg_endnotes_array,@@seg[:endnote_all]=Array.new(10){[]} + @@seg[:title],@@seg[:headings],@@seg[:main],@@seg[:idx],@@seg[:tail],@@seg_subtoc_array,@@seg_endnotes_array,@@seg[:endnote_all]=Array.new(8){[]} @@seg[:heading_endnotes]='' @@tablehead,@@number_of_cols=0,0 - @@segtocband=nil @@fns_previous='' attr_reader :seg_name_xhtml,:seg_name_xhtml_tracker def initialize(md='',data='') @@ -298,30 +293,16 @@ WOK end def heading_art(dob) format_head_seg=SiSU_EPUB_Format::Head_seg.new(@md) - if dob.is=='heading' \ - and dob.ln =~/^[1-6]/ - @@seg[:dot_nav]= (@@tracker < @@seg_total-1) \ - ? format_head_seg.dot_control_pre_next - : format_head_seg.dot_control_pre - end @@seg[:title]=format_head_seg.head end def head(dob) clean=/|<:.*?>$/ - format_head_seg=SiSU_EPUB_Format::Head_seg.new(@md) - if @@tracker < @@seg_total-1 - @@segtocband=(@@tracker==0) \ - ? format_head_seg.toc_next2 - : format_head_seg.toc_pre_next2 - else @@segtocband=format_head_seg.toc_pre2 #if format_head_seg.toc_pre2 - end @p_num ||= '' if @@is1==1 if defined? @md.creator.author \ and @md.creator.author @author=%{#{@md.creator.author}\n} end - @@seg[:nav] << format_head_seg.navigation_band(@@segtocband) ocn=if @@heading1[/.+?#{Mx[:id_o]}~(\d+);(?:[oh]|[0-6]:)\d+;\w\d+#{Mx[:id_c]}#{Mx[:id_o]}#{@dp}:#{@dp}#{Mx[:id_c]}$/]; $1 #fix else '' end @@ -452,8 +433,7 @@ WOK @@seg[:close] << format_head_seg.xhtml_close end def reinitialise - @@seg[:title],@@seg[:dot_nav],@@seg[:nav],@@seg[:headings],@@seg[:main],@@seg[:tail],@@seg[:credits]=Array.new(8){[]} - @@segtocband=nil + @@seg[:title],@@seg[:headings],@@seg[:main],@@seg[:tail],@@seg[:credits]=Array.new(5){[]} end def cleanup reinitialise diff --git a/lib/sisu/v3/html.rb b/lib/sisu/v3/html.rb index f1fab3c4..85c1d602 100644 --- a/lib/sisu/v3/html.rb +++ b/lib/sisu/v3/html.rb @@ -146,7 +146,7 @@ module SiSU_HTML @md.opt.cmd=@md.opt.cmd.gsub(/H/,'h') @md.file_type='html' if @md.opt.cmd =~/[hon]/ directories - newfilename=%{#{@env.path.output}/#{@md.fnb}/#{@md.fn[:index]}} if @md.file_type =~/html/ + newfilename=%{#{@md.file.output_path.html_scroll.dir}/#{@md.file.base_filename.html_segtoc}} if @md.file_type =~/html/ dal_array=@particulars.dal_array # dal file drawn here @tuned_file_array=SiSU_HTML_Tune::Tune.new(dal_array,@md).songsheet @tuned_file_array diff --git a/lib/sisu/v3/html_format.rb b/lib/sisu/v3/html_format.rb index e852780a..3dd0cecc 100644 --- a/lib/sisu/v3/html_format.rb +++ b/lib/sisu/v3/html_format.rb @@ -176,7 +176,7 @@ module SiSU_HTML_Format end def seg(text) %{
    - + #{text} - + #{text}
    -} - end - def scroll(text) - if @md.fns =~ /\.(?:-|ssm\.)?sst$/ - scroll=%{ -} - end - end - def seg(text) - %{ -} - end - def search - env=SiSU_Env::Info_env.new(@md.fns,@md) - env.widget.search_form('sisusearch',nil,nil,true) - end - def manifest - %{} - end - def pdf - pdf=if @md.programs[:pdf] \ - and @cf_defaults.cf_0 =~/p/ - %{ - - -} - else '' - end - end - def odf - odf=if @cf_defaults.cf_0 =~/o/ - %{ -} - else '' - end - end - def concordance(text) - if @md.concord_make \ - and @md.wc_words < 300000 #max word count for display of concordance here as would now be a large file - %{} - else '' - end - end - end class XML end class Head_toc < Head_information @@ -571,21 +488,6 @@ WOK #{@vz.table_close}

    } end - def manifest_link(text) - %{ - #{text} - } - end - def concordance_link(text) - if @md.concord_make - %{ - - #{text} - - } - else '' - end - end def make_seg_scroll_pdf wgt=Widget.new(@md) scroll=%{

    @@ -738,7 +716,7 @@ WOK end def manifest_link(text) %{ - + #{text} } @@ -746,7 +724,7 @@ WOK def concordance_link(text) if @md.concord_make %{ - + #{text} } @@ -864,24 +842,6 @@ WOK %{ } #revisit - end - def head - rdf=SiSU_XML_tags::RDF.new(@md) - %{#{doc_type} - - - #{@seg_name_html[@seg_name_html_tracker]} - - #{@md.html_title} - - -#{rdf.metatag_html} -#{@css.html} - -#{@vz.color_body} - - - -#{@vz.js_top}} end def head_seg rdf=SiSU_XML_tags::RDF.new(@md) @@ -901,10 +861,6 @@ WOK #{@vz.js_top}} end - def toc_metadata - @metalink=%{./#{@md.fn[:meatadata]}} - toc_metadata - end def title_banner(title,subtitle,creator) %{
    diff --git a/lib/sisu/v3/manpage.rb b/lib/sisu/v3/manpage.rb index 2dcccb5a..8cbdb47c 100644 --- a/lib/sisu/v3/manpage.rb +++ b/lib/sisu/v3/manpage.rb @@ -176,7 +176,7 @@ GSUB .TP Other versions of this document: .TP -manifest: <#{vz.url_root_http}/#{@md.fnb}/#{@md.fn[:manifest]}> + manifest: <#{@md.file.output_path.digest.url}/#{@md.file.base_filename.digest}> .TP at: <#{vz.url_site}> .TP diff --git a/lib/sisu/v3/odf.rb b/lib/sisu/v3/odf.rb index 4cf46d99..6cdbd57b 100644 --- a/lib/sisu/v3/odf.rb +++ b/lib/sisu/v3/odf.rb @@ -154,8 +154,8 @@ module SiSU_ODF else '' end url=@md.fnb - fn=@md.fn[:manifest] - manifest="#{@env.url.root}/#{@md.fnb}/#{@md.fn[:manifest]}" + fn=@md.file.base_filename.manifest + manifest="#{@md.file.output_path.manifest.url}/#{@md.file.base_filename.manifest}" @@odf[:tail] << %{Available document outputs:
    <#{manifest}>
    } @@odf[:tail] << %{\nSiSU: <www.jus.uio.no/sisu> and <www.sisudoc.org>} @@odf[:tail] << "\n" @@ -719,7 +719,7 @@ WOK od.puts para unless para =~/\A\s*\Z/ end od.close - opendoc=@md.fn[:odf] + opendoc=@md.file.base_filename.odt #watch where output by language FileUtils::mkdir_p(@md.file.output_path.odt.dir) unless FileTest.directory?(@md.file.output_path.odt.dir) if FileTest.directory?(@env.processing_path.odt) pwd=Dir.pwd diff --git a/lib/sisu/v3/plaintext.rb b/lib/sisu/v3/plaintext.rb index 533e35df..f9a2a235 100644 --- a/lib/sisu/v3/plaintext.rb +++ b/lib/sisu/v3/plaintext.rb @@ -200,12 +200,12 @@ WOK @plaintext[:tail] <<<} end end - class Widget < Head_information - def initialize(md) - super(md) - @md=md - @cf_defaults=SiSU_Env::Info_processing_flag.new - end - def home - %{
    - - #{@vz.png_homepage} - - - #{text} - - - - #{text} - - - - #{@vz.nav_txt_manifest} - - - - #{@vz.nav_txt_pdf_portrait} - - - - #{@vz.nav_txt_pdf_landscape} - - - - #{@vz.nav_txt_odf} - - - - #{text} - - @@ -649,60 +551,6 @@ WOK #{@vz.js_top}} - end - def concordance - if @md.concord_make - %{#{@vz.margin_css} -

    - - Concordance - -

    -#{@vz.table_close}} - else - %{#{@vz.margin_css} -#{@vz.table_close}} - end - end - def links_guide_vertical_open #??? - url=(((defined? @vz.url_hp) && @vz.url_hp =~/^https?:\/\/\S+$/) ? @vz.url_hp : @vz.url_home) - %{ -
     

    #{@md.title.full}

    #{@md.creator.author}

    +
     

    #{@md.title.full}

    #{@md.creator.author}

    WOK end def create @@ -175,6 +172,10 @@ WOK end def songsheet begin + #fix to use + p __LINE__.to_s + ':' + __FILE__ + p "#{@path}/content/#{@md.fn[:epub_concord]}" + p "#{@md.file.output_path.epub.dir}/#{@md.file.base_filename.epub}" @file_concordance=File.open("#{@path}/content/#{@md.fn[:epub_concord]}",'w') map_para rescue; SiSU_Errors::InfoError.new($!,$@,@md.opt.cmd,@md.fns).error diff --git a/lib/sisu/v3dv/epub_format.rb b/lib/sisu/v3dv/epub_format.rb index c1987fa0..344e4e7e 100644 --- a/lib/sisu/v3dv/epub_format.rb +++ b/lib/sisu/v3dv/epub_format.rb @@ -1718,50 +1718,12 @@ WOK } end end - class Widget < HeadInformation - def initialize(md) - super(md) - @md=md - @cf_defaults=SiSU_Env::InfoProcessingFlag.new - end - def home - %{

    - - #{@vz.png_homepage} - - - #{@vz.nav_txt_manifest} - -
    - - #{wgt.seg(@vz.nav_txt_toc_link)}#{wgt.scroll(@vz.nav_txt_doc_link)}#{wgt.pdf}#{wgt.odf} -
    - #{wgt.concordance(@vz.nav_txt_concordance)} - #{wgt.manifest} - #{wgt.search} - #{wgt.home} -
    } - end def head %{#{doc_type} @@ -1815,7 +1764,7 @@ WOK if @md.concord_make %{#{@vz.margin_css}

    - + Concordance

    @@ -1879,10 +1828,6 @@ WOK #{@vz.table_close}} end - def seg_metadata - @metalink=%{./#{@md.fn[:metadata]}} - metadata - end end class HeadSeg < HeadInformation def initialize(md) @@ -1896,227 +1841,15 @@ WOK #{@md.html_title} -#{@vz.font_css_table_file} +#{@css.xhtml_epub} -#{@vz.color_body} -#{@vz.js_top}} - end - def title_banner(title,subtitle,creator) - end - def dot_control_pre_next - %{ - - -
    - - #{@vz.png_nav_dot_pre} - - - - #{@vz.png_nav_dot_toc} - - - - #{@vz.png_nav_dot_nxt} - -#{@vz.table_close}} - end - def dot_control_pre - %{ - - -
    - - #{@vz.png_nav_dot_pre} - - - - #{@vz.png_nav_dot_toc} - - - - #{@vz.png_nav_dot_nxt} - -#{@vz.table_close}} - end - def toc_nav(f_pre=false,f_nxt=false,use=1) - pre=nxt='' - toc=%{ - #{@vz.epub_png_nav_toc} - -} - pre=%{ - #{@vz.epub_png_nav_pre} - -} if f_pre==true - nxt=%{ - #{@vz.epub_png_nav_nxt} - -} if f_nxt==true - DISABLE[:epub][:internal_navigation] \ - ? '' - : %{

    -#{pre} -#{toc} -#{nxt} -

    -} - end - def toc_next2 - pre,nxt=false,true - toc_nav(false,true).dup - end - def toc_pre_next2 - toc_nav(true,true).dup - end - def toc_pre2 - toc_nav(true,false).dup - end - def manifest_link(text) - %{ - #{text} - } - end - def concordance_link(text) - if @md.concord_make - %{ - #{text} - } - else '' - end - end - def doc_types #used in seg_nav_band ### - scroll=seg='' - wgt=SiSU_EPUB_Format::Widget.new(@md) - x=if @md.concord_make - %{ - - - #{wgt.seg(@vz.nav_txt_toc_link)} - #{wgt.scroll(@vz.nav_txt_doc_link)} - #{wgt.pdf}#{wgt.odf} -
    - #{wgt.concordance(@vz.nav_txt_concordance)} - #{wgt.manifest} - #{wgt.search} - #{wgt.home} -
    } - else - %{ - - - #{wgt.seg(@vz.nav_txt_toc_link)} - #{wgt.scroll(@vz.nav_txt_doc_link)} - #{wgt.pdf}#{wgt.odf} -
    - #{wgt.manifest} - #{wgt.search} - #{wgt.home} -
    } - end - end - def navigation_table - %{ -
    - - - } - end - def navigation_table1 - %{ -
    - } - end - def navigation_table2 - %{ -
    - } - end - def heading_advert_local_1 - dir=SiSU_Env::InfoEnv.new(@fns) - %{

    - -
    - - #{@md.ad_alt} - -#{@vz.table_close} -

    } - end - def heading_advert_local_2 - dir=SiSU_Env::InfoEnv.new(@fns) - %{

    - -
    - - #{@md.ad_alt} - -#{@vz.table_close} -

    } - end - def heading_advert_external - dir=SiSU_Env::InfoEnv.new(@fns) - %{

    - - @@ -253,7 +253,7 @@ module SiSU_HTML_Format if @md.concord_make \ and @md.wc_words < 300000 #max word count for display of concordance here as would now be a large file %{} @@ -336,13 +336,13 @@ WOK def manifest_link(text) # @file=SiSU_Env::FileOp.new(@md) if @md %{ - #{text} + #{text} } end def concordance_link(text) if @md.concord_make %{ - + #{text} } @@ -406,7 +406,7 @@ WOK if @md.concord_make %{#{@vz.margin_css}

    - + Concordance

    @@ -431,7 +431,7 @@ WOK Quick Ref.:
  • - + Manifest
  • @@ -452,7 +452,7 @@ WOK Quick Ref.:
  • - + Manifest
  • @@ -553,10 +553,6 @@ WOK #{@vz.table_close}} end - def seg_metadata - @metalink=%{./#{@md.fn[:metadata]}} - metadata - end def seg_tail %{
    @@ -625,24 +621,6 @@ WOK def initialize(md) #(md='') super(md) end - def head - rdf=SiSU_XML_Tags::RDF.new(@md) - %{#{doc_type} - - - #{@seg_name_html[@seg_name_html_tracker]} - - #{@md.html_title} - - -#{rdf.metatag_html} -#{@vz.font_css_table_file} - -#{@vz.color_body} - - - -#{@vz.js_top}} - end def title_banner(title,subtitle,creator) end def dot_control_pre_next @@ -676,7 +654,7 @@ WOK def dot_control_pre pre="#{@seg_name_html[@seg_name_html_tracker-2]}#{@md.lang_code_insert}#{Sfx[:html]}" up="#{@toc}#{@md.lang_code_insert}#{Sfx[:html]}" - nxt="#{@md.fn[:toc]}" + nxt="#{@md.file.base_filename.html_segtoc}" %{
    - - #{@md.ad_alt} - -#{@vz.table_close} -

    } - end - def navigation_band(segtocband) #change name to navigaion_band_banner - %{#{segtocband} -} - end - def navigation_band_bottom(segtocband,seg_table_top_control) #change name to navigaion_band_bannerless - %{ -
    - - - -
    - #{doc_types} - - #{segtocband} -
    - #{seg_table_top_control} -
    -} +#{@vz.color_body}} end def endnote_mark %{
    } end - def endnote_section_open -%{ -
    -} - end - def endnote_section_close -%{ -
    -} #revisit - end - def head - %{#{doc_type} - - - #{@seg_name_xhtml[@seg_name_xhtml_tracker]} - - #{@md.html_title} - - -#{@css.xhtml_epub} - -#{@vz.color_body}} - end - def toc_metadata - @metalink=%{./#{@md.fn[:metadata]}} - toc_metadata - end - def title_banner(title,subtitle,creator) - end end class HeadScroll < HeadToc def initialize(md) diff --git a/lib/sisu/v3dv/epub_segments.rb b/lib/sisu/v3dv/epub_segments.rb index 1119d8c8..a9747cd5 100644 --- a/lib/sisu/v3dv/epub_segments.rb +++ b/lib/sisu/v3dv/epub_segments.rb @@ -69,26 +69,19 @@ module SiSU_EPUB_Seg filename_seg=[] filename_seg << @seg[:title] << @seg[:nav] if @type=='endnotes' - @seg[:headings]=[] - format_head_seg=SiSU_EPUB_Format::HeadSeg.new(@md) - @seg[:headings] << format_head_seg.title_banner(@md.title.main,@md.title.sub,@author) + @seg[:headings]=[] #watch txt_obj={ txt: 'Endnotes', ocn_display: ''} format_seg=SiSU_EPUB_Format::FormatSeg.new(@md,txt_obj) @seg[:headings] << format_seg.title_heading1 filename_seg << @seg[:heading_endnotes] << @seg[:headings] << %{\n
    \n} << @seg[:endnote_all] << '
    ' elsif @type=='idx' @seg[:headings]=[] - format_head_seg=SiSU_EPUB_Format::HeadSeg.new(@md) - @seg[:headings] << format_head_seg.title_banner(@md.title.main,@md.title.sub,@author) - txt_obj={ txt: 'Index', ocn_display: ''} format_seg=SiSU_EPUB_Format::FormatSeg.new(@md,txt_obj) @seg[:headings] << format_seg.title_heading1 filename_seg << @seg[:heading_idx] << @seg[:headings] << %{\n
    \n} << @seg[:idx] << '
    ' elsif @type=='metadata' metadata=SiSU_Metadata::Summary.new(@md).xhtml_display.metadata @seg[:headings]=[] - format_head_seg=SiSU_EPUB_Format::HeadSeg.new(@md) - @seg[:headings] << format_head_seg.title_banner(@md.title.main,@md.title.sub,@author) txt_obj={ txt: 'Metadata', ocn_display: ''} format_seg=SiSU_EPUB_Format::FormatSeg.new(@md,txt_obj) @seg[:headings] << format_seg.title_heading1 @@ -104,8 +97,6 @@ WOK else '' end @seg[:headings]=[] - format_head_seg=SiSU_EPUB_Format::HeadSeg.new(@md) - @seg[:headings] << format_head_seg.title_banner(@md.title.main,@md.title.sub,@author) txt_obj={ txt: 'Manifest', ocn_display: ''} format_seg=SiSU_EPUB_Format::FormatSeg.new(@md,txt_obj) @seg[:headings] << format_seg.title_heading1 @@ -131,10 +122,9 @@ WOK @@loop_count=@@seg_total=@@tracker=0 @@is4=@@is3=@@is2=@@is1=0 @@heading1=@@heading2=@@heading3=@@heading4=0 - @@seg[:nav],@@seg[:title],@@seg[:headings],@@seg[:main],@@seg[:idx],@@seg[:tail],@@seg_subtoc_array,@@seg_endnotes_array,@@seg[:endnote_all]=Array.new(10){[]} + @@seg[:headings],@@seg[:main],@@seg[:idx],@@seg[:tail],@@seg_subtoc_array,@@seg_endnotes_array,@@seg[:endnote_all]=Array.new(7){[]} @@seg[:heading_endnotes]='' @@tablehead,@@number_of_cols=0,0 - @@segtocband=nil @@fns_previous='' attr_reader :seg_name_xhtml,:seg_name_xhtml_tracker def initialize(md='',data='') @@ -296,31 +286,16 @@ WOK data end def heading_art(dob) - format_head_seg=SiSU_EPUB_Format::HeadSeg.new(@md) - if dob.is=='heading' \ - and dob.ln =~/^[1-6]/ - @@seg[:dot_nav]= (@@tracker < @@seg_total-1) \ - ? format_head_seg.dot_control_pre_next - : format_head_seg.dot_control_pre - end - @@seg[:title]=format_head_seg.head + @@seg[:title]=SiSU_EPUB_Format::HeadSeg.new(@md).head end def head(dob) clean=/|<:.*?>$/ - format_head_seg=SiSU_EPUB_Format::HeadSeg.new(@md) - if @@tracker < @@seg_total-1 - @@segtocband=(@@tracker==0) \ - ? format_head_seg.toc_next2 - : format_head_seg.toc_pre_next2 - else @@segtocband=format_head_seg.toc_pre2 #if format_head_seg.toc_pre2 - end @p_num ||= '' if @@is1==1 if defined? @md.creator.author \ and @md.creator.author @author=%{#{@md.creator.author}\n} end - @@seg[:nav] << format_head_seg.navigation_band(@@segtocband) ocn=if @@heading1[/.+?#{Mx[:id_o]}~(\d+);(?:[oh]|[0-6]:)\d+;\w\d+#{Mx[:id_c]}#{Mx[:id_o]}#{@dp}:#{@dp}#{Mx[:id_c]}$/]; $1 #fix else '' end @@ -451,8 +426,7 @@ WOK @@seg[:close] << format_head_seg.xhtml_close end def reinitialise - @@seg[:title],@@seg[:dot_nav],@@seg[:nav],@@seg[:headings],@@seg[:main],@@seg[:tail],@@seg[:credits]=Array.new(8){[]} - @@segtocband=nil + @@seg[:headings],@@seg[:main],@@seg[:tail],@@seg[:credits]=Array.new(4){[]} end def cleanup reinitialise diff --git a/lib/sisu/v3dv/html.rb b/lib/sisu/v3dv/html.rb index 2c249348..5141c14b 100644 --- a/lib/sisu/v3dv/html.rb +++ b/lib/sisu/v3dv/html.rb @@ -146,7 +146,7 @@ module SiSU_HTML @md.opt.cmd=@md.opt.cmd.gsub(/H/,'h') @md.file_type='html' if @md.opt.cmd =~/[hon]/ directories - newfilename=%{#{@env.path.output}/#{@md.fnb}/#{@md.fn[:index]}} if @md.file_type =~/html/ + newfilename=%{#{@md.file.output_path.html_scroll.dir}/#{@md.file.base_filename.html_segtoc}} if @md.file_type =~/html/ dal_array=@particulars.dal_array # dal file drawn here @tuned_file_array=SiSU_HTML_Tune::Tune.new(dal_array,@md).songsheet @tuned_file_array diff --git a/lib/sisu/v3dv/html_format.rb b/lib/sisu/v3dv/html_format.rb index fdf7f568..7195fedb 100644 --- a/lib/sisu/v3dv/html_format.rb +++ b/lib/sisu/v3dv/html_format.rb @@ -176,7 +176,7 @@ module SiSU_HTML_Format end def seg(text) %{
    - + #{text} - + #{text}
    -} - end - def scroll(text) - if @md.fns =~ /\.(?:-|ssm\.)?sst$/ - scroll=%{ -} - end - end - def seg(text) - %{ -} - end - def search - env=SiSU_Env::InfoEnv.new(@md.fns,@md) - env.widget.search_form('sisusearch',nil,nil,true) - end - def manifest - %{} - end - def pdf - pdf=if @md.programs[:pdf] \ - and @cf_defaults.cf_0 =~/p/ - %{ - - -} - else '' - end - end - def odf - odf=if @cf_defaults.cf_0 =~/o/ - %{ -} - else '' - end - end - def concordance(text) - if @md.concord_make \ - and @md.wc_words < 300000 #max word count for display of concordance here as would now be a large file - %{} - else '' - end - end - end class XML end class HeadToc < HeadInformation @@ -571,21 +488,6 @@ WOK #{@vz.table_close}

    } end - def manifest_link(text) - %{ - #{text} - } - end - def concordance_link(text) - if @md.concord_make - %{ - - #{text} - - } - else '' - end - end def make_seg_scroll_pdf wgt=Widget.new(@md) scroll=%{

    @@ -738,7 +716,7 @@ WOK end def manifest_link(text) %{ - + #{text} } @@ -746,7 +724,7 @@ WOK def concordance_link(text) if @md.concord_make %{ - + #{text} } @@ -864,24 +842,6 @@ WOK %{ } #revisit - end - def head - rdf=SiSU_XML_Tags::RDF.new(@md) - %{#{doc_type} - - - #{@seg_name_html[@seg_name_html_tracker]} - - #{@md.html_title} - - -#{rdf.metatag_html} -#{@css.html} - -#{@vz.color_body} - - - -#{@vz.js_top}} end def head_seg rdf=SiSU_XML_Tags::RDF.new(@md) @@ -901,10 +861,6 @@ WOK #{@vz.js_top}} end - def toc_metadata - @metalink=%{./#{@md.fn[:meatadata]}} - toc_metadata - end def title_banner(title,subtitle,creator) %{
    diff --git a/lib/sisu/v3dv/manpage.rb b/lib/sisu/v3dv/manpage.rb index 94416eb2..dd681967 100644 --- a/lib/sisu/v3dv/manpage.rb +++ b/lib/sisu/v3dv/manpage.rb @@ -176,7 +176,7 @@ GSUB .TP Other versions of this document: .TP -manifest: <#{vz.url_root_http}/#{@md.fnb}/#{@md.fn[:manifest]}> + manifest: <#{@md.file.output_path.digest.url}/#{@md.file.base_filename.digest}> .TP at: <#{vz.url_site}> .TP diff --git a/lib/sisu/v3dv/odf.rb b/lib/sisu/v3dv/odf.rb index d58da74e..1b928548 100644 --- a/lib/sisu/v3dv/odf.rb +++ b/lib/sisu/v3dv/odf.rb @@ -154,8 +154,8 @@ module SiSU_ODF else '' end url=@md.fnb - fn=@md.fn[:manifest] - manifest="#{@env.url.root}/#{@md.fnb}/#{@md.fn[:manifest]}" + fn=@md.file.base_filename.manifest + manifest="#{@md.file.output_path.manifest.url}/#{@md.file.base_filename.manifest}" @@odf[:tail] << %{Available document outputs:
    <#{manifest}>
    } @@odf[:tail] << %{\nSiSU: <www.jus.uio.no/sisu> and <www.sisudoc.org>} @@odf[:tail] << "\n" @@ -720,7 +720,7 @@ WOK od.puts para unless para =~/\A\s*\Z/ end od.close - opendoc=@md.fn[:odf] + opendoc=@md.file.base_filename.odt #watch where output by language FileUtils::mkdir_p(@md.file.output_path.odt.dir) unless FileTest.directory?(@md.file.output_path.odt.dir) if FileTest.directory?(@env.processing_path.odt) pwd=Dir.pwd diff --git a/lib/sisu/v3dv/plaintext.rb b/lib/sisu/v3dv/plaintext.rb index ba1cc48a..ba1f30d2 100644 --- a/lib/sisu/v3dv/plaintext.rb +++ b/lib/sisu/v3dv/plaintext.rb @@ -200,12 +200,12 @@ WOK @plaintext[:tail] <<<} end end - class Widget < HeadInformation - def initialize(md) - super(md) - @md=md - @cf_defaults=SiSU_Env::InfoProcessingFlag.new - end - def home - %{
    - - #{@vz.png_homepage} - - - #{text} - - - - #{text} - - - - #{@vz.nav_txt_manifest} - - - - #{@vz.nav_txt_pdf_portrait} - - - - #{@vz.nav_txt_pdf_landscape} - - - - #{@vz.nav_txt_odf} - - - - #{text} - - @@ -649,60 +551,6 @@ WOK #{@vz.js_top}} - end - def concordance - if @md.concord_make - %{#{@vz.margin_css} -

    - - Concordance - -

    -#{@vz.table_close}} - else - %{#{@vz.margin_css} -#{@vz.table_close}} - end - end - def links_guide_vertical_open #??? - url=(((defined? @vz.url_hp) && @vz.url_hp =~/^https?:\/\/\S+$/) ? @vz.url_hp : @vz.url_home) - %{ -