aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2012-02-03 20:02:32 -0500
committerRalph Amissah <ralph@amissah.com>2012-02-03 20:26:44 -0500
commit145f3092505f614ca5c81a4cbcfea9f22329e745 (patch)
tree9bc696e29f1d8df43f65279c7e1dc4b696cc9007 /lib
parentv3 v3dv: vim syntax highlighting, patch from Thilo Six <T.Six@gmx.de> applied (diff)
v3 v3dv: path & url links, updates for multiple output directory structures
Diffstat (limited to 'lib')
-rw-r--r--lib/sisu/v3/concordance.rb2
-rw-r--r--lib/sisu/v3/dal_doc_str.rb213
-rw-r--r--lib/sisu/v3/epub_concordance.rb5
-rw-r--r--lib/sisu/v3/epub_format.rb277
-rw-r--r--lib/sisu/v3/epub_segments.rb24
-rw-r--r--lib/sisu/v3/html.rb2
-rw-r--r--lib/sisu/v3/html_format.rb64
-rw-r--r--lib/sisu/v3/manpage.rb2
-rw-r--r--lib/sisu/v3/odf.rb6
-rw-r--r--lib/sisu/v3/plaintext.rb6
-rw-r--r--lib/sisu/v3/shared_metadata.rb2
-rw-r--r--lib/sisu/v3/texpdf_format.rb10
-rw-r--r--lib/sisu/v3/update.rb32
-rw-r--r--lib/sisu/v3/xhtml.rb7
-rw-r--r--lib/sisu/v3/xml_format.rb195
-rw-r--r--lib/sisu/v3dv/concordance.rb2
-rw-r--r--lib/sisu/v3dv/dal_doc_str.rb221
-rw-r--r--lib/sisu/v3dv/db_import.rb78
-rw-r--r--lib/sisu/v3dv/epub_concordance.rb9
-rw-r--r--lib/sisu/v3dv/epub_format.rb281
-rw-r--r--lib/sisu/v3dv/epub_segments.rb34
-rw-r--r--lib/sisu/v3dv/html.rb2
-rw-r--r--lib/sisu/v3dv/html_format.rb64
-rw-r--r--lib/sisu/v3dv/manpage.rb2
-rw-r--r--lib/sisu/v3dv/odf.rb6
-rw-r--r--lib/sisu/v3dv/plaintext.rb6
-rw-r--r--lib/sisu/v3dv/shared_metadata.rb2
-rw-r--r--lib/sisu/v3dv/texinfo_format.rb1
-rw-r--r--lib/sisu/v3dv/texpdf_format.rb10
-rw-r--r--lib/sisu/v3dv/update.rb32
-rw-r--r--lib/sisu/v3dv/xhtml.rb7
-rw-r--r--lib/sisu/v3dv/xml_format.rb195
32 files changed, 160 insertions, 1639 deletions
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=%{<a href="http://www.jus.uio.no/sisu/" target="_top"><img border="0" height="44" width="144" valign="center" src="#{@file.path_rel_links.html_seg_2}_sisu/image/sisu.png" alt="SiSU home --&gt;"></a>}
@doc_details =<<WOK
-<table summary="links to text related to this rudimentary index" width="96%" border="0" bgcolor="white" cellpadding="0" align="center"><tr><td width="2%" align="right">&nbsp;</td><td width="94%" valign="top" align="justify"><h1 class="small"><a href="#{@md.fn[:toc]}" #{@vz.js_toc}><b>#{@md.title.full}</b></a></h1><p class="bold">#{@md.author}</p></td></tr></table>
+<table summary="links to text related to this rudimentary index" width="96%" border="0" bgcolor="white" cellpadding="0" align="center"><tr><td width="2%" align="right">&nbsp;</td><td width="94%" valign="top" align="justify"><h1 class="small"><a href="#{@md.file.base_filename.html_segtoc}" #{@vz.js_toc}><b>#{@md.title.full}</b></a></h1><p class="bold">#{@md.author}</p></td></tr></table>
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=%{<a href="http://www.jus.uio.no/sisu/" target="_top"><img border="0" height="44" width="144" valign="center" src="../_sisu/image/sisu.png" alt="SiSU home --&gt;"></a>}
@doc_details =<<WOK
-<table summary="links to text related to this rudimentary index" width="96%" border="0" bgcolor="white" cellpadding="0" align="center"><tr><td width="2%" align="right">&nbsp;</td><td width="94%" valign="top" align="justify"><h1 class="small"><a href="#{@md.fn[:toc]}" #{@vz.js_toc}><b>#{@md.title.full}</b></a></h1><p class="bold">#{@md.creator.author}</p></td></tr></table>
+<table summary="links to text related to this rudimentary index" width="96%" border="0" bgcolor="white" cellpadding="0" align="center"><tr><td width="2%" align="right">&nbsp;</td><td width="94%" valign="top" align="justify"><h1 class="small"><a href="#{@md.file.base_filename.epub}" #{@vz.js_toc}><b>#{@md.title.full}</b></a></h1><p class="bold">#{@md.creator.author}</p></td></tr></table>
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
</html>}
end
end
- class Widget < Head_information
- def initialize(md)
- super(md)
- @md=md
- @cf_defaults=SiSU_Env::Info_processing_flag.new
- end
- def home
- %{<td align="center" bgcolor=#{@vz.color_band2}>
- <a href="../index.html" target="_top">
- #{@vz.png_homepage}</a>
-</td>
-}
- end
- def search
- env=SiSU_Env::Info_env.new(@md.fns,@md)
- env.widget.search_form('sisusearch',nil,nil,true)
- end
- def manifest
- %{<td align="center" bgcolor=#{@vz.color_band2}>
- <a href="#{@md.fn[:manifest]}" target="_top" #{@vz.js_manifest}>
- #{@vz.nav_txt_manifest}
- </a>
-</td>}
- 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
- %{<p class="align_right">
- <a href="index.html" target="_top">
- #{@vz.epub_png_nav_toc}
- </a>
-</p>
-}
- end
def seg_head_navigation_band
firstseg=%{<a href="#{@md.firstseg}#{Sfx[:epub_xhtml]}" target="_top">
#{@vz.epub_png_nav_nxt}
@@ -1778,30 +1740,17 @@ WOK
? ''
: %{<p class="align_right">#{firstseg}</p>}
end
- def manifest_link(text) #watch fix removed font size 2
- %{ <a href="#{@md.fn[:manifest]}" target="_top" #{@vz.js_manifest}>#{text}</a>}
+ def manifest_link(text)
+ %{ <a href="#{@md.file.output_path.manifest.url}/#{@md.file.base_filename.manifest}" target="_top" #{@vz.js_manifest}>#{text}</a>}
end
def concordance_link(text) #watch fix removed font size 2
if @md.concord_make
- %{<a href="#{@md.fn[:concordance]}" target="_top" #{@vz.js_concordance}>
+ %{<a href="#{@md.file.base_filename.html_concordance}" target="_top" #{@vz.js_concordance}>
#{text}
</a>}
else ''
end
end
- def make_concordance
- manifest=scroll=seg=''
- wgt=Widget.new(@md)
- %{<table summary="toc scroll and segment with pdf" border="0" cellpadding="3" cellspacing="0">
-<tr>
- #{wgt.seg(@vz.nav_txt_toc_link)}#{wgt.scroll(@vz.nav_txt_doc_link)}#{wgt.pdf}#{wgt.odf}
-<td align="center" bgcolor=#{@vz.color_band2}>
- #{wgt.concordance(@vz.nav_txt_concordance)}
- #{wgt.manifest}
- #{wgt.search}
- #{wgt.home}
-</tr></table>}
- end
def head
%{#{doc_type}
<head>
@@ -1815,7 +1764,7 @@ WOK
if @md.concord_make
%{#{@vz.margin_css}
<h4 class="toc">
- <a href="./#{@md.fn[:concordance]}" #{@vz.js_concordance}>
+ <a href="./#{@md.file.base_filename.html_concordance}" #{@vz.js_concordance}>
<i>Concordance</i>
</a>
</h4>
@@ -1879,10 +1828,6 @@ WOK
</h4>
#{@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}
</title>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
-#{@vz.font_css_table_file}
+#{@css.xhtml_epub}
</head>
-#{@vz.color_body}
-#{@vz.js_top}}
- end
- def title_banner(title,subtitle,creator)
- end
- def dot_control_pre_next
- %{<table summary="segment hidden control pre and next" width="100%" border="0" cellpadding="0" bgcolor=#{@vz.color_grey_pale} align="center">
-<tr><td align="left">
- <a href="#{@seg_name_xhtml[@seg_name_xhtml_tracker-1]}#{Sfx[:epub_xhtml]}" target="_top" #{@vz.js_prev}>
- #{@vz.png_nav_dot_pre}
- </a>
-</td>
-<td align="center">
- <a href="#{@index}#{Sfx[:epub_xhtml]}" target="_top" #{@vz.js_toc}>
- #{@vz.png_nav_dot_toc}
- </a>
-</td>
-<td align="right">
- <a href="#{@seg_name_xhtml[@seg_name_xhtml_tracker+1]}#{Sfx[:epub_xhtml]}" target="_top" #{@vz.js_next}>
- #{@vz.png_nav_dot_nxt}
- </a>
-#{@vz.table_close}}
- end
- def dot_control_pre
- %{<table summary="segment hidden control pre" width="100%" border="0" cellpadding="0" bgcolor=#{@vz.color_grey_pale} align="center">
-<tr><td align="left">
- <a href="#{@seg_name_xhtml[@seg_name_xhtml_tracker-1]}#{Sfx[:epub_xhtml]}" target="_top" #{@vz.js_prev}>
- #{@vz.png_nav_dot_pre}
- </a>
-</td>
-<td align="center">
- <a href="#{@index}#{Sfx[:epub_xhtml]}" target="_top" #{@vz.js_toc}>
- #{@vz.png_nav_dot_toc}
- </a>
-</td>
-<td align="right">
- <a href="#{@md.fn[:toc]}" target="_top" #{@vz.js_next}>
- #{@vz.png_nav_dot_nxt}
- </a>
-#{@vz.table_close}}
- end
- def toc_nav(f_pre=false,f_nxt=false,use=1)
- pre=nxt=''
- toc=%{<a href="#{@index}#{Sfx[:epub_xhtml]}" target="_top" #{@vz.js_toc}>
- #{@vz.epub_png_nav_toc}
-</a>
-}
- pre=%{<a href="#{@seg_name_xhtml[@seg_name_xhtml_tracker-use]}#{Sfx[:epub_xhtml]}" target="_top" #{@vz.js_prev}>
- #{@vz.epub_png_nav_pre}
-</a>
-} if f_pre==true
- nxt=%{<a href="#{@seg_name_xhtml[@seg_name_xhtml_tracker+1]}#{Sfx[:epub_xhtml]}" target="_top" #{@vz.js_next}>
- #{@vz.epub_png_nav_nxt}
- </a>
-} if f_nxt==true
- DISABLE[:epub][:internal_navigation] \
- ? ''
- : %{<p class="align_right">
-#{pre}
-#{toc}
-#{nxt}
-</p>
-}
- 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)
- %{<a href="#{@md.fn[:manifest]}" target="_top" #{@vz.js_manifest}>
- #{text}
- </a>}
- end
- def concordance_link(text)
- if @md.concord_make
- %{<a href="#{@md.fn[:concordance]}" target="_top" #{@vz.js_concordance}>
- #{text}
- </a>}
- else ''
- end
- end
- def doc_types #used in seg_nav_band ###
- scroll=seg=''
- wgt=Widget.new(@md)
- x=if @md.concord_make
- %{
-<table summary="segment navigation available documents types: toc,doc,pdf,concordance" border="0" cellpadding="3" cellspacing="0">
-<tr>
- #{wgt.seg(@vz.nav_txt_toc_link)}
- #{wgt.scroll(@vz.nav_txt_doc_link)}
- #{wgt.pdf}#{wgt.odf}
-<td align="center" bgcolor=#{@vz.color_band2}>
- #{wgt.concordance(@vz.nav_txt_concordance)}
- #{wgt.manifest}
- #{wgt.search}
- #{wgt.home}
-</tr></table>}
- else
- %{
-<table summary="segment navigation available documents types: toc,doc,pdf,concordance" border="0" cellpadding="3" cellspacing="0">
-<tr>
- #{wgt.seg(@vz.nav_txt_toc_link)}
- #{wgt.scroll(@vz.nav_txt_doc_link)}
- #{wgt.pdf}#{wgt.odf}
-<td align="center" bgcolor=#{@vz.color_band2}>
- #{wgt.manifest}
- #{wgt.search}
- #{wgt.home}
-</tr></table>}
- end
- end
- def navigation_table
- %{<table summary="navigation segment table" width=#{@vz.table_width_1} border="0" bgcolor="white" cellpadding="0">
-<tr><th width="#{@@indent['leve_1']}" align="right">
-</td>
-<td valign="top">
- <font size=2>}
- end
- def navigation_table1
- %{<table summary="navigation segment table1" width=#{@vz.table_width_1} border="0" cellpadding=#{@vz.table_cellpad_box} bgcolor=#{@vz.color_table1} align="left">
-<tr><td valign="top">
- <font size="2">}
- end
- def navigation_table2
- %{<table summary="navigation segment table2" width=#{@vz.table_width_2} border="0" cellpadding=#{@vz.table_cellpad_box} bgcolor=#{@vz.color_table2} align="left">
-<tr><td valign="top">
- <font size="2">}
- end
- def heading_advert_local_1
- dir=SiSU_Env::Info_env.new(@fns)
- %{ <p class="center">
-<table summary="image" border="0" cellpadding="3" cellspacing="0" align="center">
-<tr><td align="center" bgcolor="white">
- <a href="http://#{@md.ad_url}#{Sfx[:epub_xhtml]}" target="_top">
- <img border="0" src="#{dir.url.images_epub}/#{@md.ad_png}" alt="#{@md.ad_alt}" />
- </a>
-#{@vz.table_close}
-</p>}
- end
- def heading_advert_local_2
- dir=SiSU_Env::Info_env.new(@fns)
- %{ <p class="center">
-<table summary="image" border="0" cellpadding="3" cellspacing="0" align="center">
-<tr><td align="center" bgcolor="white">
- <a href="#{@md.ad_url}#{Sfx[:epub_xhtml]}" target="_top">
- <img border="0" src="#{dir.url.images_epub}/#{@md.ad_png}" alt="#{@md.ad_alt}" />
- </a>
-#{@vz.table_close}
-</p>}
- end
- def heading_advert_external
- dir=SiSU_Env::Info_env.new(@fns)
- %{ <p class="center">
-<table summary="image" border="0" cellpadding="3" cellspacing="0" align="center">
-<tr><td align="center" bgcolor="white">
- <a href="#{@md.ad_url}#{Sfx[:epub_xhtml]}" target="external">
- <img border="0" src="#{dir.url.images_epub}/#{@md.ad_png}" alt="#{@md.ad_alt}" />
- </a>
-#{@vz.table_close}
-</p>}
- 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
- %{
-<div class="main_column">
- <table summary="segment navigation band" bgcolor=#{@vz.color_band1} width="100%"><tr>
- <td width="70%" align="center">
- #{doc_types}
- </td>
- <td width="30%" align="right">
- #{segtocband}
- </td></tr>
- </table>
- #{seg_table_top_control}
-</div>
-}
+#{@vz.color_body}}
end
def endnote_mark
%{
<hr class="endnote" />
}
end
- def endnote_section_open
-%{
-<div class="endnote">
-}
- end
- def endnote_section_close
-%{
-</div>
-} #revisit
- end
- def head
- %{#{doc_type}
-<head>
- <title>
- #{@seg_name_xhtml[@seg_name_xhtml_tracker]} -
- #{@md.html_title}
- </title>
-<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
-#{@css.xhtml_epub}
-</head>
-#{@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<div class="content">\n} << @seg[:idx] << '</div>'
@@ -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=%{<b>#{@md.creator.author}</b>\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)
%{<td align="center" bgcolor="#99CC66">
- <a href="#{@md.fn[:toc]}" target="_top" #{@vz.js_doc}>
+ <a href="#{@md.file.base_filename.html_segtoc}" target="_top" #{@vz.js_doc}>
#{text}
</a>
</td>
@@ -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
%{<td align="center" bgcolor=#{@vz.color_band2}>
- <a href="#{@md.fn[:concordance]}" target="_top" #{@vz.js_concordance}>
+ <a href="#{@md.file.base_filename.html_concordance}" target="_top" #{@vz.js_concordance}>
#{text}
</a>
</td>}
@@ -336,13 +336,13 @@ WOK
def manifest_link(text)
# @file=SiSU_Env::SiSU_file.new(@md) if @md
%{<font size=2>
- <a href="#{@md.fn[:manifest]}" target="_top" #{@vz.js_manifest}>#{text}</a>
+ <a href="#{@md.file.base_filename.manifest}" target="_top" #{@vz.js_manifest}>#{text}</a>
</font>}
end
def concordance_link(text)
if @md.concord_make
%{<font size=2>
- <a href="#{@md.fn[:concordance]}" target="_top" #{@vz.js_concordance}>
+ <a href="#{@md.file.base_filename.html_concordance}" target="_top" #{@vz.js_concordance}>
#{text}
</a>
</font>}
@@ -406,7 +406,7 @@ WOK
if @md.concord_make
%{#{@vz.margin_css}
<h4 class="toc">
- <a href="./#{@md.fn[:concordance]}" #{@vz.js_concordance}>
+ <a href="./#{@md.file.base_filename.html_concordance}" #{@vz.js_concordance}>
<i>Concordance</i>
</a>
</h4>
@@ -431,7 +431,7 @@ WOK
Quick Ref.:
</li>
<li class="ref">
- <a href="#{@md.fn[:manifest]}" alt="Document Manifest" target="_top">
+ <a href="#{@md.file.base_filename.manifest}" alt="Document Manifest" target="_top">
Manifest
</a>
</li>
@@ -452,7 +452,7 @@ WOK
Quick Ref.:
</li>
<li class="ref">
- <a href="#{@md.fn[:manifest]}" alt="Document Manifest" target="_top">
+ <a href="#{@md.file.base_filename.manifest}" alt="Document Manifest" target="_top">
Manifest
</a>
</li>
@@ -553,10 +553,6 @@ WOK
</h4>
#{@vz.table_close}}
end
- def seg_metadata
- @metalink=%{./#{@md.fn[:metadata]}}
- metadata
- end
def seg_tail
%{
<div class="main_column">
@@ -625,24 +621,6 @@ WOK
def initialize(md) #(md='')
super(md)
end
- def head
- rdf=SiSU_XML_tags::RDF.new(@md)
- %{#{doc_type}
-<head>
- <title>
- #{@seg_name_html[@seg_name_html_tracker]} -
- #{@md.html_title}
- </title>
-<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
-#{rdf.metatag_html}
-#{@vz.font_css_table_file}
-</head>
-#{@vz.color_body}
-<a name="top" id="top"></a>
-<a name="up" id="up"></a>
-<a name="start" id="start"></a>
-#{@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}"
%{<table summary="segment hidden control pre" width="100%" border="0" cellpadding="0" bgcolor=#{@vz.color_grey_pale} align="center">
<tr><td align="left">
<a href="#{pre}" target="_top" #{@vz.js_prev}>
@@ -738,7 +716,7 @@ WOK
end
def manifest_link(text)
%{<font size=2>
- <a href="#{@md.fn[:manifest]}" target="_top" #{@vz.js_manifest}>
+ <a href="#{@md.file.base_filename.manifest}" target="_top" #{@vz.js_manifest}>
#{text}
</a>
</font>}
@@ -746,7 +724,7 @@ WOK
def concordance_link(text)
if @md.concord_make
%{<font size=2>
- <a href="#{@md.fn[:concordance]}" target="_top" #{@vz.js_concordance}>
+ <a href="#{@md.file.base_filename.html_concordance}" target="_top" #{@vz.js_concordance}>
#{text}
</a>
</font>}
@@ -865,24 +843,6 @@ WOK
</div>
} #revisit
end
- def head
- rdf=SiSU_XML_tags::RDF.new(@md)
- %{#{doc_type}
-<head>
- <title>
- #{@seg_name_html[@seg_name_html_tracker]} -
- #{@md.html_title}
- </title>
-<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
-#{rdf.metatag_html}
-#{@css.html}
-</head>
-#{@vz.color_body}
-<a name="top" id="top"></a>
-<a name="up" id="up"></a>
-<a name="start" id="start"></a>
-#{@vz.js_top}}
- end
def head_seg
rdf=SiSU_XML_tags::RDF.new(@md)
%{#{doc_type}
@@ -901,10 +861,6 @@ WOK
<a name="start" id="start"></a>
#{@vz.js_top}}
end
- def toc_metadata
- @metalink=%{./#{@md.fn[:meatadata]}}
- toc_metadata
- end
def title_banner(title,subtitle,creator)
%{
<div class="summary">
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] << %{<text:p text:style-name="P_normal">Available document outputs: <br /> &lt;<text:a xlink:type="simple" xlink:href="#{manifest}">#{manifest}</text:a>&gt;</text:p>}
@@odf[:tail] << %{\n<text:p text:style-name="P_normal">SiSU: &lt;<text:a xlink:type="simple" xlink:href="http://www.jus.uio.no/lm">www.jus.uio.no/sisu</text:a>&gt; and &lt;<text:a xlink:type="simple" xlink:href="http://www.sisudoc.org">www.sisudoc.org</text:a>&gt;</text:p>}
@@odf[:tail] << "\n</office:text></office:body></office:document-content>"
@@ -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] <<<<WOK
#{@br}
plaintext (plain text):
- #{base_url}/#{@md.fn[:plain]}#{@br}
+ #{@md.file.output_path.txt.url}/#{@md.file.base_filename.txt}#{@br}
Other versions of this document: #{@br}
manifest:
- #{base_url}/#{@md.fn[:manifest]}#{@br}
+ #{@md.file.output_path.manifest.url}/#{@md.file.base_filename.manifest}#{@br}
at:
- #{@env.url.root}#{@br}
+ #{@md.file.output_path.base.url}#{@br}
#{sc}
* #{generator}
diff --git a/lib/sisu/v3/shared_metadata.rb b/lib/sisu/v3/shared_metadata.rb
index 06d382c3..ca81998b 100644
--- a/lib/sisu/v3/shared_metadata.rb
+++ b/lib/sisu/v3/shared_metadata.rb
@@ -1001,7 +1001,7 @@ WOK
language=l[:n]
tr=SiSU_Translate::Source.new(@md,language)
tag="Document Manifest @"
- inf="#{@br}#{base_html}/#{@md.fn[:manifest]}"
+ inf="#{@br}#{@md.file.output_path.manifest.url}/#{@md.file.base_filename.manifest}"
meta << meta_para(tag,inf)
if defined? @md.title.full \
and @md.title.full=~/\S+/
diff --git a/lib/sisu/v3/texpdf_format.rb b/lib/sisu/v3/texpdf_format.rb
index 76fc5d37..25cb0c63 100644
--- a/lib/sisu/v3/texpdf_format.rb
+++ b/lib/sisu/v3/texpdf_format.rb
@@ -1551,16 +1551,6 @@ Generated by \\href{http://www.jus.uio.no/sisu}{SiSU www.jus.uio.no/sisu } \\\\
\\end{small}}&
WOK
end
- def manifest_info
- url=@md.fnb.gsub(/(?:\\)*([$&~%_#}{^])/,'\\\\\1')
- fn=@md.fn[:manifest].gsub(/(?:\\)*([$&~%_#}{^])/,'\\\\\1')
-<<WOK
-{\\begin{footnotesize}
-\\\\ For alternative output formats of this document check:
-\\\\ #{@brace_url.tex_open}\\begin{scriptsize}\\href{#{@vz.url_root_http}/#{url}/#{fn}}{#{@vz.url_root_http}/#{url}/#{fn}}\\end{scriptsize}#{@brace_url.tex_close}
-\\end{footnotesize}}&
-WOK
- end
def endnotes #not used should be inserted before MetaData section which preceeds doc_tail, but is "part of document"
<<WOK
\\subsection*{Endnotes}
diff --git a/lib/sisu/v3/update.rb b/lib/sisu/v3/update.rb
index e46743ec..5b5430e2 100644
--- a/lib/sisu/v3/update.rb
+++ b/lib/sisu/v3/update.rb
@@ -83,42 +83,48 @@ module SiSU_Update_control_flag
@env=SiSU_Env::Info_env.new(@md.fns)
out=@env.path.output
@base_path="#{out}/#{@md.fnb}"
+ @pdf_fn=SiSU_Env::SiSU_file.new(@md).base_filename
end
def set_flags #-mNhwpoabxXyv
flag='-v'
- if FileTest.file?("#{@base_path}/#{@md.fn[:doc]}")==true
+ if FileTest.file?("#{@md.file.output_path.txt.dir}/#{@md.file.base_filename.txt}")==true
flag=flag + 'a'
end
- if FileTest.file?("#{@base_path}/#{@md.fn[:toc]}")==true \
- or FileTest.file?("#{@base_path}/#{@md.fn[:doc]}")==true
+ if FileTest.file?("#{@md.file.output_path.html_seg.dir}/#{@md.file.base_filename.html_seg}")==true
+ or FileTest.file?("#{@md.file.output_path.html_scroll.dir}/#{@md.file.base_filename.html_scroll}")==true
flag=flag + 'h'
end
- if FileTest.file?("#{@base_path}/#{@md.fn[:xhtml]}")==true
+ if FileTest.file?("#{@md.file.output_path.xhtml.dir}/#{@md.file.base_filename.xhtml}")==true
flag=flag + 'b'
end
- if FileTest.file?("#{@base_path}/#{@md.fn[:sax]}")==true
+ if FileTest.file?("#{@md.file.output_path.xml_sax.dir}/#{@md.file.base_filename.xml_sax}")==true
flag=flag + 'x'
end
- if FileTest.file?("#{@base_path}/#{@md.fn[:dom]}")==true
+ if FileTest.file?("#{@md.file.output_path.xml_dom.dir}/#{@md.file.base_filename.xml_dom}")==true
flag=flag + 'X'
end
- if FileTest.file?("#{@base_path}/#{@md.fn[:odf]}")==true
+ if FileTest.file?("#{@md.file.output_path.epub.dir}/#{@md.file.base_filename.epub}")==true
+ flag=flag + 'e'
+ end
+ if FileTest.file?("#{@md.file.output_path.odt.dir}/#{@md.file.base_filename.odt}")==true
flag=flag + 'o'
end
- if FileTest.file?("#{@base_path}/#{@md.fn[:pdf_p]}")==true \
- or FileTest.file?("#{@base_path}/#{@md.fn[:pdf_l]}")==true
+ if FileTest.file?("#{@md.file.output_path.pdf.dir}/#{@pdf_fn.pdf_p_a4}")==true \
+ or FileTest.file?("#{@md.file.output_path.pdf.dir}/#{@pdf_fn.pdf_l_a4}")==true \
+ or FileTest.file?("#{@md.file.output_path.pdf.dir}/#{@pdf_fn.pdf_p_letter}")==true \
+ or FileTest.file?("#{@md.file.output_path.pdf.dir}/#{@pdf_fn.pdf_l_letter}")==true
flag=flag + 'p'
end
- if FileTest.file?("#{@base_path}/#{@md.fn[:concordance]}")==true
+ if FileTest.file?("#{@md.file.output_path.html_concordance.dir}/#{@md.file.base_filename.html_concordance}")==true
flag=flag + 'w'
end
- if FileTest.file?("#{@base_path}/#{@md.fn[:digest]}")==true
+ if FileTest.file?("#{@md.file.output_path.digest.dir}/#{@md.file.base_filename.digest}")==true
flag=flag + 'N'
end
- if FileTest.file?("#{@base_path}/#{@md.fns}")==true
+ if FileTest.file?("#{@md.file.output_path.src.dir}/#{@md.file.base_filename.src}")==true
flag=flag + 's'
end
- if FileTest.file?("#{@base_path}/sisupod.tgz")==true
+ if FileTest.file?("#{@md.file.output_path.sisupod.dir}/#{@md.file.base_filename.sisupod}")==true
flag=flag + 'S'
end
puts flag
diff --git a/lib/sisu/v3/xhtml.rb b/lib/sisu/v3/xhtml.rb
index 7f910e47..6f8c6da5 100644
--- a/lib/sisu/v3/xhtml.rb
+++ b/lib/sisu/v3/xhtml.rb
@@ -83,9 +83,10 @@ module SiSU_XHTML
unless @opt.cmd =~/q/
path=@env.path.output_tell
loc=@env.url.output_tell
-
- tool=if @opt.cmd =~/[MV]/; "#{@env.program.web_browser} file://#{@md.file.output_path.xhtml.dir}/#{@md.file.base_filename.xhtml}#{path}/#{@md.fnb}/#{@md.fn[:xhtml]}\n\t#{@env.program.xml_viewer} file://#{@md.file.output_path.xhtml.dir}/#{@md.file.base_filename.xhtml}#{path}/#{@md.fnb}/#{@md.fn[:xhtml]}"
- elsif @opt.cmd =~/v/; "#{@env.program.web_browser} file://#{@md.file.output_path.xhtml.dir}/#{@md.file.base_filename.xhtml}"
+ tool=if @opt.cmd =~/[MV]/
+ "#{@env.program.web_browser} file://#{@md.file.output_path.xhtml.dir}/#{@md.file.base_filename.xhtml}"
+ elsif @opt.cmd =~/v/
+ "#{@env.program.web_browser} file://#{@md.file.output_path.xhtml.dir}/#{@md.file.base_filename.xhtml}"
else "[#{@opt.f_pth[:lng_is]}] #{@opt.fns}"
end
@opt.cmd=~/[MVvz]/ \
diff --git a/lib/sisu/v3/xml_format.rb b/lib/sisu/v3/xml_format.rb
index 39e5d7b8..c0d9d622 100644
--- a/lib/sisu/v3/xml_format.rb
+++ b/lib/sisu/v3/xml_format.rb
@@ -406,89 +406,6 @@ WOK
</html>}
end
end
- class Widget < Head_information
- def initialize(md)
- super(md)
- @md=md
- @cf_defaults=SiSU_Env::Info_processing_flag.new
- end
- def home
- %{<td align="center" bgcolor=#{@vz.color_band2}>
- <a href="../index.html" target="_top">
- #{@vz.png_homepage}</a>
-</td>
-}
- end
- def scroll(text)
- if @md.fns =~ /\.(?:-|ssm\.)?sst$/
- scroll=%{<td align="center" bgcolor=#{@vz.color_band2}>
- <a href="#{@md.fn[:doc]}" target="_top" #{@vz.js_doc}>
- #{text}
- </a>
-</td>
-}
- end
- end
- def seg(text)
- %{<td align="center" bgcolor="#99CC66">
- <a href="#{@md.fn[:toc]}" target="_top" #{@vz.js_doc}>
- #{text}
- </a>
-</td>
-}
- end
- def search
- env=SiSU_Env::Info_env.new(@md.fns,@md)
- env.widget.search_form('sisusearch',nil,nil,true)
- end
- def manifest
- %{<td align="center" bgcolor=#{@vz.color_band2}>
- <a href="#{@md.fn[:manifest]}" target="_top" #{@vz.js_manifest}>
- #{@vz.nav_txt_manifest}
- </a>
-</td>}
- end
- def pdf
- pdf=if @md.programs[:pdf] \
- and @cf_defaults.cf_0 =~/p/
- %{
-<td align="center" bgcolor=#{@vz.color_band2}>
- <a href="#{@md.fn[:pdf_p]}" target="_top" #{@vz.js_portrait}>
- #{@vz.nav_txt_pdf_portrait}
- </a>
-</td>
-<td align="center" bgcolor=#{@vz.color_band2}>
- <a href="#{@md.fn[:pdf_l]}" target="_top" #{@vz.js_landscape}>
- #{@vz.nav_txt_pdf_landscape}
- </a>
-</td>
-}
- else ''
- end
- end
- def odf
- odf=if @cf_defaults.cf_0 =~/o/
- %{
-<td align="center" bgcolor=#{@vz.color_band2}>
- <a href="#{@md.fn[:odf]}" target="_top" #{@vz.js_odf}>
- #{@vz.nav_txt_odf}
- </a>
-</td>}
- 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
- %{<td align="center" bgcolor=#{@vz.color_band2}>
- <a href="#{@md.fn[:concordance]}" target="_top" #{@vz.js_concordance}>
- #{text}
- </a>
- </td>}
- else ''
- end
- end
- end
class XML
end
class Head_toc < Head_information
@@ -571,21 +488,6 @@ WOK
#{@vz.table_close}
<p />}
end
- def manifest_link(text)
- %{<font size=2>
- <a href="#{@md.fn[:manifest]}" target="_top" #{@vz.js_manifest}>#{text}</a>
- </font>}
- end
- def concordance_link(text)
- if @md.concord_make
- %{<font size=2>
- <a href="#{@md.fn[:concordance]}" target="_top" #{@vz.js_concordance}>
- #{text}
- </a>
- </font>}
- else ''
- end
- end
def make_seg_scroll_pdf
wgt=Widget.new(@md)
scroll=%{<td align="center" bgcolor=#{@vz.color_band2}>
@@ -650,60 +552,6 @@ WOK
<a name="start" id="start"></a>
#{@vz.js_top}}
end
- def concordance
- if @md.concord_make
- %{#{@vz.margin_css}
- <h4 class="toc">
- <a href="./#{@md.fn[:concordance]}" #{@vz.js_concordance}>
- <i>Concordance</i>
- </a>
- </h4>
-#{@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)
- %{
-<div id="vertical_links">
- <ul id="vertical">
- <li class="refbold">
- <a href="#{url}" #{@vz.js_home}>
- #{@vz.txt_hp}
- </a>
- </li>
- <li class="ref">
- Quick Ref.:
- </li>
- <li class="ref">
- <a href="#{@md.fn[:manifest]}" target="_top">
- Manifest
- </a>
- </li>
-<!- quick ref -!>}
- end
- def links_guide_horizontal_open #???
- url=(((defined? @vz.url_hp) && @vz.url_hp =~/^https?:\/\/\S+$/) ? @vz.url_hp : @vz.url_home)
- %{
-<div id="horizontal_links">
- <ul id="horizontal">
- <li class="refbold">
- <a href="#{url}" #{@vz.js_home}>
- #{@vz.txt_hp}
- </a>
- </li>
- <li class="ref">
- Quick Ref.:
- </li>
- <li class="ref">
- <a href="#{@md.fn[:manifest]}" target="_top">
- Manifest
- </a>
- </li>
-<!- quick ref -!>}
- end
def links_guide_open(type='horizontal')
if type=='vertical'; links_guide_vertical_open
else links_guide_horizontal_open
@@ -795,10 +643,6 @@ WOK
</h4>
#{@vz.table_close}}
end
- def seg_metadata
- @metalink=%{./#{@md.fn[:metadata]}}
- metadata
- end
def seg_tail
%{
<div class="main_column">
@@ -906,24 +750,6 @@ WOK
</a>
#{@vz.table_close}}
end
- def dot_control_pre
- %{<table summary="segment hidden control pre" width="100%" border="0" cellpadding="0" bgcolor=#{@vz.color_grey_pale} align="center">
-<tr><td align="left">
- <a href="#{@seg_name_html[@seg_name_html_tracker-2]}#{@md.lang_code_insert}#{Sfx[:xhtml]}" target="_top" #{@vz.js_prev}>
- #{@vz.png_nav_dot_pre}
- </a>
-</td>
-<td align="center">
- <a href="#{@index}#{@md.lang_code_insert}#{Sfx[:xhtml]}" target="_top" #{@vz.js_toc}>
- #{@vz.png_nav_dot_toc}
- </a>
-</td>
-<td align="right">
- <a href="#{@md.fn[:toc]}" target="_top" #{@vz.js_next}>
- #{@vz.png_nav_dot_nxt}
- </a>
-#{@vz.table_close}}
- end
def toc_nav(f_pre=false,f_nxt=false,use=1)
pre=nxt=''
toc=%{<td align="center" bgcolor=#{@vz.color_band1}>
@@ -959,23 +785,6 @@ WOK
def toc_pre2
toc_nav(true,false,2).dup
end
- def manifest_link(text)
- %{<font size=2>
- <a href="#{@md.fn[:manifest]}" target="_top" #{@vz.js_manifest}>
- #{text}
- </a>
- </font>}
- end
- def concordance_link(text)
- if @md.concord_make
- %{<font size=2>
- <a href="#{@md.fn[:concordance]}" target="_top" #{@vz.js_concordance}>
- #{text}
- </a>
- </font>}
- else ''
- end
- end
def doc_types #used in seg_nav_band ###
scroll=seg=''
wgt=Widget.new(@md)
@@ -1137,10 +946,6 @@ WOK
<a name="start" id="start"></a>
#{@vz.js_top}}
end
- def toc_metadata
- @metalink=%{./#{@md.fn[:meatadata]}}
- toc_metadata
- end
def title_banner(title,subtitle,creator)
%{
<div class="summary">
diff --git a/lib/sisu/v3dv/concordance.rb b/lib/sisu/v3dv/concordance.rb
index e51514c3..bc238543 100644
--- a/lib/sisu/v3dv/concordance.rb
+++ b/lib/sisu/v3dv/concordance.rb
@@ -115,7 +115,7 @@ module SiSU_Concordance
@fnb=@md.fnb
@lex_button=%{<a href="http://www.jus.uio.no/sisu/" target="_top"><img border="0" height="44" width="144" valign="center" src="#{@file.path_rel_links.html_seg_2}_sisu/image/sisu.png" alt="SiSU home --&gt;"></a>}
@doc_details =<<WOK
-<table summary="links to text related to this rudimentary index" width="96%" border="0" bgcolor="white" cellpadding="0" align="center"><tr><td width="2%" align="right">&nbsp;</td><td width="94%" valign="top" align="justify"><h1 class="small"><a href="#{@md.fn[:toc]}" #{@vz.js_toc}><b>#{@md.title.full}</b></a></h1><p class="bold">#{@md.author}</p></td></tr></table>
+<table summary="links to text related to this rudimentary index" width="96%" border="0" bgcolor="white" cellpadding="0" align="center"><tr><td width="2%" align="right">&nbsp;</td><td width="94%" valign="top" align="justify"><h1 class="small"><a href="#{@md.file.base_filename.html_segtoc}" #{@vz.js_toc}><b>#{@md.title.full}</b></a></h1><p class="bold">#{@md.author}</p></td></tr></table>
WOK
end
def create
diff --git a/lib/sisu/v3dv/dal_doc_str.rb b/lib/sisu/v3dv/dal_doc_str.rb
index 91fa9458..ba62ad9e 100644
--- a/lib/sisu/v3dv/dal_doc_str.rb
+++ b/lib/sisu/v3dv/dal_doc_str.rb
@@ -467,10 +467,10 @@ module SiSU_DAL_DocumentStructureExtract
gsub(/[ ][ ]/m,"#{Mx[:nbsp]*2}").
gsub(/#{Mx[:nbsp]}\s/,"#{Mx[:nbsp]*2}")
t_o=t_o + Mx[:br_nl] if t_o =~/\S+/
- elsif t_o.is=='group' \
- or t_o.is=='block' \
- or t_o.is=='alt' \
- or t_o.is=='verse'
+ elsif t_o.is==:group \
+ || t_o.is==:block \
+ || t_o.is==:alt \
+ || t_o.is==:verse
t_o.obj=t_o.obj.gsub(/\n/m,"#{Mx[:br_nl]}").
gsub(/[ ][ ]/m,"#{Mx[:nbsp]*2}").
gsub(/#{Mx[:nbsp]}\s/,"#{Mx[:nbsp]*2}")
@@ -528,219 +528,6 @@ module SiSU_DAL_DocumentStructureExtract
h={ obj: str, ocn_: false }
SiSU_DAL_DocumentStructure::ObjectPara.new.paragraph(h)
end
- def metadata
- meta=[]
- dir=SiSU_Env::InfoEnv.new(@md.fns)
- base_html="#{dir.url.root}/#{@md.fnb}"
- l=SiSU_Env::StandardiseLanguage.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_DAL_DocumentStructure::ObjectHeading.new.heading(h)
- h={ ln: 4, name: 'metadata', obj: 'Metadata', autonum_: false, ocn_: false }
- meta << SiSU_DAL_DocumentStructure::ObjectHeading.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='')
lines,lines_new=@data,[]
lines.each do |line|
diff --git a/lib/sisu/v3dv/db_import.rb b/lib/sisu/v3dv/db_import.rb
index a2b66937..93b47029 100644
--- a/lib/sisu/v3dv/db_import.rb
+++ b/lib/sisu/v3dv/db_import.rb
@@ -113,6 +113,7 @@ module SiSU_DbImport
@id_n =0 if @col[:lid].nil? or @col[:lid].to_s.empty?
@col[:lv1]=@col[:lv2]=@col[:lv3]=@col[:lv4]=@col[:lv5]=@col[:lv6]=0
@db=SiSU_Env::InfoDb.new
+ @pdf_fn=SiSU_Env::FileOp.new(@md).base_filename
@@dl ||=SiSU_Env::InfoEnv.new.digest.length
end
def marshal_load
@@ -606,53 +607,64 @@ module SiSU_DbImport
or @fnb.nil?
p 'file output path error' #remove
end
- if FileTest.file?("#{out}/#{@fnb}/#{@md.fn[:plain]}")==true
- f[:txt],u[:txt]='plaintext,', "'#{base}/#{@fnb}/#{@md.fn[:plain]}',"
+ if FileTest.file?("#{@md.file.output_path.txt.dir}/#{@md.file.base_filename.txt}")==true
+ f[:txt],u[:txt]='plaintext,', "'#{@md.file.output_path.txt.url}/#{@md.file.base_filename.txt}',"
end
- if FileTest.file?("#{out}/#{@fnb}/#{@md.fn[:toc]}")==true
- f[:html_toc],u[:html_toc]='html_toc,', "'#{base}/#{@fnb}/#{@md.fn[:toc]}',"
+ if FileTest.file?("#{@md.file.output_path.html_seg.dir}/#{@md.file.base_filename.html_seg}")==true
+ f[:html_toc],u[:html_toc]='html_toc,', "'#{@md.file.output_path.html_seg.url}/#{@md.file.base_filename.html_seg}',"
end
- if FileTest.file?("#{out}/#{@fnb}/#{@md.fn[:doc]}")==true
- f[:html_doc],u[:html_doc]='html_doc,', "'#{base}/#{@fnb}/#{@md.fn[:doc]}',"
+ if FileTest.file?("#{@md.file.output_path.html_scroll.dir}/#{@md.file.base_filename.html_scroll}")==true
+ f[:html_doc],u[:html_doc]='html_doc,', "'#{@md.file.output_path.html_scroll.url}/#{@md.file.base_filename.html_scroll}',"
end
- if FileTest.file?("#{out}/#{@fnb}/#{@md.fn[:xhtml]}")==true
- f[:xhtml],u[:xhtml]='xhtml,', "'#{base}/#{@fnb}/#{@md.fn[:xhtml]}',"
+ if FileTest.file?("#{@md.file.output_path.xhtml.dir}/#{@md.file.base_filename.xhtml}")==true
+ f[:xhtml],u[:xhtml]='xhtml,', "'#{@md.file.output_path.xhtml.url}/#{@md.file.base_filename.xhtml}',"
end
- if FileTest.file?("#{out}/#{@fnb}/#{@md.fn[:sax]}")==true
- f[:xml_sax],u[:xml_sax]='xml_sax,', "'#{base}/#{@fnb}/#{@md.fn[:sax]}',"
+ if FileTest.file?("#{@md.file.output_path.xml_sax.dir}/#{@md.file.base_filename.xml_sax}")==true
+ f[:xml_sax],u[:xml_sax]='xml_sax,', "'#{@md.file.output_path.xml_sax.url}/#{@md.file.base_filename.xml_sax}',"
end
- if FileTest.file?("#{out}/#{@fnb}/#{@md.fn[:dom]}")==true
- f[:xml_dom],u[:xml_dom]='xml_dom,', "'#{base}/#{@fnb}/#{@md.fn[:dom]}',"
+ if FileTest.file?("#{@md.file.output_path.xml_dom.dir}/#{@md.file.base_filename.xml_dom}")==true
+ f[:xml_dom],u[:xml_dom]='xml_dom,', "'#{@md.file.output_path.xml_dom.url}/#{@md.file.base_filename.xml_dom}',"
end
- if FileTest.file?("#{out}/#{@fnb}/#{@md.fn[:odf]}")==true
- f[:odf],u[:odf]='odf,', "'#{base}/#{@fnb}/#{@md.fn[:odf]}',"
+ if FileTest.file?("#{@md.file.output_path.epub.dir}/#{@md.file.base_filename.epub}")==true
+ f[:epub],u[:epub]='epub,', "'#{@md.file.output_path.epub.url}/#{@md.file.base_filename.epub}',"
end
- if FileTest.file?("#{out}/#{@fnb}/#{@md.fn[:pdf_p]}")==true
- f[:pdf_p],u[:pdf_p]='pdf_p,', "'#{base}/#{@fnb}/#{@md.fn[:pdf_p]}',"
+ if FileTest.file?("#{@md.file.output_path.odt.dir}/#{@md.file.base_filename.odt}")==true
+ f[:odf],u[:odf]='odf,', "'#{@md.file.output_path.odt.url}/#{@md.file.base_filename.odt}',"
end
- if FileTest.file?("#{out}/#{@fnb}/#{@md.fn[:pdf_l]}")==true
- f[:pdf_l],u[:pdf_l]='pdf_l,', "'#{base}/#{@fnb}/#{@md.fn[:pdf_l]}',"
+ if FileTest.file?("#{@md.file.output_path.pdf.dir}/#{@pdf_fn.pdf_p_a4}")==true #\
+ #or FileTest.file?("#{@md.file.output_path.pdf.dir}/#{@pdf_fn.pdf_p_letter}")==true
+ f[:pdf_p],u[:pdf_p]='pdf_p,', "'#{@md.file.output_path.pdf.url}/#{@pdf_fn.pdf_p_a4}',"
end
- if FileTest.file?("#{out}/#{@fnb}/#{@md.fn[:concordance]}")==true
- f[:concordance],u[:concordance]='concordance,', "'#{base}/#{@fnb}/#{@md.fn[:concordance]}',"
+ if FileTest.file?("#{@md.file.output_path.pdf.dir}/#{@pdf_fn.pdf_l_a4}")==true #\
+ #or FileTest.file?("#{@md.file.output_path.pdf.dir}/#{@pdf_fn.pdf_l_letter}")==true
+ f[:pdf_l],u[:pdf_l]='pdf_l,', "'#{@md.file.output_path.pdf.url}/#{@pdf_fn.pdf_l_a4}',"
end
- if FileTest.file?("#{out}/#{@fnb}/#{@opt.fns}.tex")==true
- f[:latex_p],u[:latex_p]='latex_p,', "'#{base}/#{@fnb}/#{@opt.fns}.tex',"
+ if FileTest.file?("#{@md.file.output_path.html_concordance.dir}/#{@md.file.base_filename.html_concordance}")==true
+ f[:concordance],u[:concordance]='concordance,', "'#{@md.file.output_path.html_concordance.url}/#{@md.file.base_filename.html_concordance}',"
end
- if FileTest.file?("#{out}/#{@fnb}/#{@opt.fns}.landscape.tex")==true
- f[:latex_l],u[:latex_l]='latex_l,', "'#{base}/#{@fnb}/#{@opt}.fns}.landscape.tex',"
+ #if FileTest.file?("#{@md.file.output_path.x.dir}/#{@md.file.base_filename.x}")==true
+ # f[:latex_p],u[:latex_p]='latex_p,', "'#{@md.file.output_path.x.url}/#{@md.file.base_filename.x}',"
+ #end
+ ##if FileTest.file?("#{out}/#{@fnb}/#{@opt.fns}.tex")==true
+ ## f[:latex_p],u[:latex_p]='latex_p,', "'#{base}/#{@fnb}/#{@opt.fns}.tex',"
+ ##end
+ #if FileTest.file?("#{@md.file.output_path.x.dir}/#{@md.file.base_filename.x}")==true
+ # f[:latex_l],u[:latex_l]='latex_l,', "'#{@md.file.output_path.x.url}/#{@md.file.base_filename.x}',"
+ #end
+ ##if FileTest.file?("#{out}/#{@fnb}/#{@opt.fns}.landscape.tex")==true
+ ## f[:latex_l],u[:latex_l]='latex_l,', "'#{base}/#{@fnb}/#{@opt}.fns}.landscape.tex',"
+ ##end
+ if FileTest.file?("#{@md.file.output_path.digest.dir}/#{@md.file.base_filename.digest}")==true
+ f[:digest],u[:digest]='digest,', "'#{@md.file.output_path.digest.url}/#{@md.file.base_filename.digest}',"
end
- if FileTest.file?("#{out}/#{@fnb}/#{@md.fn[:digest]}")==true
- f[:digest],u[:digest]='digest,', "'#{base}/#{@fnb}/#{@md.fn[:digest]}',"
+ if FileTest.file?("#{@md.file.output_path.manifest.dir}/#{@md.file.base_filename.manifest}")==true #revisit, was to be text, this is html
+ f[:manifest],u[:manifest]='manifest,', "'#{@md.file.output_path.manifest.url}/#{@md.file.base_filename.manifest}',"
end
- if FileTest.file?("#{out}/#{@fnb}/#{@md.fn[:manifest]}")==true #revisit, was to be text, this is html
- f[:manifest],u[:manifest]='manifest,', "'#{base}/#{@fnb}/#{@md.fn[:manifest]}',"
+ if FileTest.file?("#{@md.file.output_path.src.dir}/#{@md.file.base_filename.src}")==true
+ f[:markup],u[:markup]='markup,', "'#{@md.file.output_path.src.url}/#{@md.file.base_filename.src}',"
end
- if FileTest.file?("#{out}/#{@fnb}/#{@opt.fns}.meta")==true
- f[:markup],u[:markup]='markup,', "'#{base}/#{@fnb}/#{@opt.fns}.meta',"
- end
- if FileTest.file?("#{out}/#{@fnb}/#{@opt.fns}.tgz")==true
- f[:sisupod],u[:sisupod]='sisupod,', "'#{base}/#{@fnb}/#{@opt.fns}.tgz',"
+ if FileTest.file?("#{@md.file.output_path.sisupod.dir}/#{@md.file.base_filename.sisupod}")==true
+ f[:sisupod],u[:sisupod]='sisupod,', "'#{@md.file.output_path.sisupod.url}/#{@md.file.base_filename.sisupod}',"
end
t=SiSU_DbTuple::LoadUrls.new(@conn,f,u,@@id_t,@opt,@file)
tuple=t.tuple
diff --git a/lib/sisu/v3dv/epub_concordance.rb b/lib/sisu/v3dv/epub_concordance.rb
index 1106ec13..40dd83f5 100644
--- a/lib/sisu/v3dv/epub_concordance.rb
+++ b/lib/sisu/v3dv/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=%{<a href="http://www.jus.uio.no/sisu/" target="_top"><img border="0" height="44" width="144" valign="center" src="../_sisu/image/sisu.png" alt="SiSU home --&gt;"></a>}
@doc_details =<<WOK
-<table summary="links to text related to this rudimentary index" width="96%" border="0" bgcolor="white" cellpadding="0" align="center"><tr><td width="2%" align="right">&nbsp;</td><td width="94%" valign="top" align="justify"><h1 class="small"><a href="#{@md.fn[:toc]}" #{@vz.js_toc}><b>#{@md.title.full}</b></a></h1><p class="bold">#{@md.creator.author}</p></td></tr></table>
+<table summary="links to text related to this rudimentary index" width="96%" border="0" bgcolor="white" cellpadding="0" align="center"><tr><td width="2%" align="right">&nbsp;</td><td width="94%" valign="top" align="justify"><h1 class="small"><a href="#{@md.file.base_filename.epub}" #{@vz.js_toc}><b>#{@md.title.full}</b></a></h1><p class="bold">#{@md.creator.author}</p></td></tr></table>
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
</html>}
end
end
- class Widget < HeadInformation
- def initialize(md)
- super(md)
- @md=md
- @cf_defaults=SiSU_Env::InfoProcessingFlag.new
- end
- def home
- %{<td align="center" bgcolor=#{@vz.color_band2}>
- <a href="../index.html" target="_top">
- #{@vz.png_homepage}</a>
-</td>
-}
- end
- def search
- env=SiSU_Env::InfoEnv.new(@md.fns,@md)
- env.widget.search_form('sisusearch',nil,nil,true)
- end
- def manifest
- %{<td align="center" bgcolor=#{@vz.color_band2}>
- <a href="#{@md.fn[:manifest]}" target="_top" #{@vz.js_manifest}>
- #{@vz.nav_txt_manifest}
- </a>
-</td>}
- 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
- %{<p class="align_right">
- <a href="index.html" target="_top">
- #{@vz.epub_png_nav_toc}
- </a>
-</p>
-}
- end
def seg_head_navigation_band
firstseg=%{<a href="#{@md.firstseg}#{Sfx[:epub_xhtml]}" target="_top">
#{@vz.epub_png_nav_nxt}
@@ -1778,30 +1740,17 @@ WOK
? ''
: %{<p class="align_right">#{firstseg}</p>}
end
- def manifest_link(text) #watch fix removed font size 2
- %{ <a href="#{@md.fn[:manifest]}" target="_top" #{@vz.js_manifest}>#{text}</a>}
+ def manifest_link(text)
+ %{ <a href="#{@md.file.output_path.manifest.url}/#{@md.file.base_filename.manifest}" target="_top" #{@vz.js_manifest}>#{text}</a>}
end
- def concordance_link(text) #watch fix removed font size 2
+ def concordance_link(text)
if @md.concord_make
- %{<a href="#{@md.fn[:concordance]}" target="_top" #{@vz.js_concordance}>
+ %{<a href="#{@md.file.base_filename.html_concordance}" target="_top" #{@vz.js_concordance}>
#{text}
</a>}
else ''
end
end
- def make_concordance
- manifest=scroll=seg=''
- wgt=SiSU_EPUB_Format::Widget.new(@md)
- %{<table summary="toc scroll and segment with pdf" border="0" cellpadding="3" cellspacing="0">
-<tr>
- #{wgt.seg(@vz.nav_txt_toc_link)}#{wgt.scroll(@vz.nav_txt_doc_link)}#{wgt.pdf}#{wgt.odf}
-<td align="center" bgcolor=#{@vz.color_band2}>
- #{wgt.concordance(@vz.nav_txt_concordance)}
- #{wgt.manifest}
- #{wgt.search}
- #{wgt.home}
-</tr></table>}
- end
def head
%{#{doc_type}
<head>
@@ -1815,7 +1764,7 @@ WOK
if @md.concord_make
%{#{@vz.margin_css}
<h4 class="toc">
- <a href="./#{@md.fn[:concordance]}" #{@vz.js_concordance}>
+ <a href="./#{@md.file.base_filename.html_concordance}" #{@vz.js_concordance}>
<i>Concordance</i>
</a>
</h4>
@@ -1879,10 +1828,6 @@ WOK
</h4>
#{@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}
</title>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
-#{@vz.font_css_table_file}
+#{@css.xhtml_epub}
</head>
-#{@vz.color_body}
-#{@vz.js_top}}
- end
- def title_banner(title,subtitle,creator)
- end
- def dot_control_pre_next
- %{<table summary="segment hidden control pre and next" width="100%" border="0" cellpadding="0" bgcolor=#{@vz.color_grey_pale} align="center">
-<tr><td align="left">
- <a href="#{@seg_name_xhtml[@seg_name_xhtml_tracker-1]}#{Sfx[:epub_xhtml]}" target="_top" #{@vz.js_prev}>
- #{@vz.png_nav_dot_pre}
- </a>
-</td>
-<td align="center">
- <a href="#{@index}#{Sfx[:epub_xhtml]}" target="_top" #{@vz.js_toc}>
- #{@vz.png_nav_dot_toc}
- </a>
-</td>
-<td align="right">
- <a href="#{@seg_name_xhtml[@seg_name_xhtml_tracker+1]}#{Sfx[:epub_xhtml]}" target="_top" #{@vz.js_next}>
- #{@vz.png_nav_dot_nxt}
- </a>
-#{@vz.table_close}}
- end
- def dot_control_pre
- %{<table summary="segment hidden control pre" width="100%" border="0" cellpadding="0" bgcolor=#{@vz.color_grey_pale} align="center">
-<tr><td align="left">
- <a href="#{@seg_name_xhtml[@seg_name_xhtml_tracker-1]}#{Sfx[:epub_xhtml]}" target="_top" #{@vz.js_prev}>
- #{@vz.png_nav_dot_pre}
- </a>
-</td>
-<td align="center">
- <a href="#{@index}#{Sfx[:epub_xhtml]}" target="_top" #{@vz.js_toc}>
- #{@vz.png_nav_dot_toc}
- </a>
-</td>
-<td align="right">
- <a href="#{@md.fn[:toc]}" target="_top" #{@vz.js_next}>
- #{@vz.png_nav_dot_nxt}
- </a>
-#{@vz.table_close}}
- end
- def toc_nav(f_pre=false,f_nxt=false,use=1)
- pre=nxt=''
- toc=%{<a href="#{@index}#{Sfx[:epub_xhtml]}" target="_top" #{@vz.js_toc}>
- #{@vz.epub_png_nav_toc}
-</a>
-}
- pre=%{<a href="#{@seg_name_xhtml[@seg_name_xhtml_tracker-use]}#{Sfx[:epub_xhtml]}" target="_top" #{@vz.js_prev}>
- #{@vz.epub_png_nav_pre}
-</a>
-} if f_pre==true
- nxt=%{<a href="#{@seg_name_xhtml[@seg_name_xhtml_tracker+1]}#{Sfx[:epub_xhtml]}" target="_top" #{@vz.js_next}>
- #{@vz.epub_png_nav_nxt}
- </a>
-} if f_nxt==true
- DISABLE[:epub][:internal_navigation] \
- ? ''
- : %{<p class="align_right">
-#{pre}
-#{toc}
-#{nxt}
-</p>
-}
- 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)
- %{<a href="#{@md.fn[:manifest]}" target="_top" #{@vz.js_manifest}>
- #{text}
- </a>}
- end
- def concordance_link(text)
- if @md.concord_make
- %{<a href="#{@md.fn[:concordance]}" target="_top" #{@vz.js_concordance}>
- #{text}
- </a>}
- 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
- %{
-<table summary="segment navigation available documents types: toc,doc,pdf,concordance" border="0" cellpadding="3" cellspacing="0">
-<tr>
- #{wgt.seg(@vz.nav_txt_toc_link)}
- #{wgt.scroll(@vz.nav_txt_doc_link)}
- #{wgt.pdf}#{wgt.odf}
-<td align="center" bgcolor=#{@vz.color_band2}>
- #{wgt.concordance(@vz.nav_txt_concordance)}
- #{wgt.manifest}
- #{wgt.search}
- #{wgt.home}
-</tr></table>}
- else
- %{
-<table summary="segment navigation available documents types: toc,doc,pdf,concordance" border="0" cellpadding="3" cellspacing="0">
-<tr>
- #{wgt.seg(@vz.nav_txt_toc_link)}
- #{wgt.scroll(@vz.nav_txt_doc_link)}
- #{wgt.pdf}#{wgt.odf}
-<td align="center" bgcolor=#{@vz.color_band2}>
- #{wgt.manifest}
- #{wgt.search}
- #{wgt.home}
-</tr></table>}
- end
- end
- def navigation_table
- %{<table summary="navigation segment table" width=#{@vz.table_width_1} border="0" bgcolor="white" cellpadding="0">
-<tr><th width="#{@@indent['leve_1']}" align="right">
-</td>
-<td valign="top">
- <font size=2>}
- end
- def navigation_table1
- %{<table summary="navigation segment table1" width=#{@vz.table_width_1} border="0" cellpadding=#{@vz.table_cellpad_box} bgcolor=#{@vz.color_table1} align="left">
-<tr><td valign="top">
- <font size="2">}
- end
- def navigation_table2
- %{<table summary="navigation segment table2" width=#{@vz.table_width_2} border="0" cellpadding=#{@vz.table_cellpad_box} bgcolor=#{@vz.color_table2} align="left">
-<tr><td valign="top">
- <font size="2">}
- end
- def heading_advert_local_1
- dir=SiSU_Env::InfoEnv.new(@fns)
- %{ <p class="center">
-<table summary="image" border="0" cellpadding="3" cellspacing="0" align="center">
-<tr><td align="center" bgcolor="white">
- <a href="http://#{@md.ad_url}#{Sfx[:epub_xhtml]}" target="_top">
- <img border="0" src="#{dir.url.images_epub}/#{@md.ad_png}" alt="#{@md.ad_alt}" />
- </a>
-#{@vz.table_close}
-</p>}
- end
- def heading_advert_local_2
- dir=SiSU_Env::InfoEnv.new(@fns)
- %{ <p class="center">
-<table summary="image" border="0" cellpadding="3" cellspacing="0" align="center">
-<tr><td align="center" bgcolor="white">
- <a href="#{@md.ad_url}#{Sfx[:epub_xhtml]}" target="_top">
- <img border="0" src="#{dir.url.images_epub}/#{@md.ad_png}" alt="#{@md.ad_alt}" />
- </a>
-#{@vz.table_close}
-</p>}
- end
- def heading_advert_external
- dir=SiSU_Env::InfoEnv.new(@fns)
- %{ <p class="center">
-<table summary="image" border="0" cellpadding="3" cellspacing="0" align="center">
-<tr><td align="center" bgcolor="white">
- <a href="#{@md.ad_url}#{Sfx[:epub_xhtml]}" target="external">
- <img border="0" src="#{dir.url.images_epub}/#{@md.ad_png}" alt="#{@md.ad_alt}" />
- </a>
-#{@vz.table_close}
-</p>}
- 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
- %{
-<div class="main_column">
- <table summary="segment navigation band" bgcolor=#{@vz.color_band1} width="100%"><tr>
- <td width="70%" align="center">
- #{doc_types}
- </td>
- <td width="30%" align="right">
- #{segtocband}
- </td></tr>
- </table>
- #{seg_table_top_control}
-</div>
-}
+#{@vz.color_body}}
end
def endnote_mark
%{
<hr class="endnote" />
}
end
- def endnote_section_open
-%{
-<div class="endnote">
-}
- end
- def endnote_section_close
-%{
-</div>
-} #revisit
- end
- def head
- %{#{doc_type}
-<head>
- <title>
- #{@seg_name_xhtml[@seg_name_xhtml_tracker]} -
- #{@md.html_title}
- </title>
-<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
-#{@css.xhtml_epub}
-</head>
-#{@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<div class="content">\n} << @seg[:endnote_all] << '</div>'
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<div class="content">\n} << @seg[:idx] << '</div>'
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=%{<b>#{@md.creator.author}</b>\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)
%{<td align="center" bgcolor="#99CC66">
- <a href="#{@md.fn[:toc]}" target="_top" #{@vz.js_doc}>
+ <a href="#{@md.file.base_filename.html_segtoc}" target="_top" #{@vz.js_doc}>
#{text}
</a>
</td>
@@ -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
%{<td align="center" bgcolor=#{@vz.color_band2}>
- <a href="#{@md.fn[:concordance]}" target="_top" #{@vz.js_concordance}>
+ <a href="#{@md.file.base_filename.html_concordance}" target="_top" #{@vz.js_concordance}>
#{text}
</a>
</td>}
@@ -336,13 +336,13 @@ WOK
def manifest_link(text)
# @file=SiSU_Env::FileOp.new(@md) if @md
%{<font size=2>
- <a href="#{@md.fn[:manifest]}" target="_top" #{@vz.js_manifest}>#{text}</a>
+ <a href="#{@md.file.base_filename.manifest}" target="_top" #{@vz.js_manifest}>#{text}</a>
</font>}
end
def concordance_link(text)
if @md.concord_make
%{<font size=2>
- <a href="#{@md.fn[:concordance]}" target="_top" #{@vz.js_concordance}>
+ <a href="#{@md.file.base_filename.html_concordance}" target="_top" #{@vz.js_concordance}>
#{text}
</a>
</font>}
@@ -406,7 +406,7 @@ WOK
if @md.concord_make
%{#{@vz.margin_css}
<h4 class="toc">
- <a href="./#{@md.fn[:concordance]}" #{@vz.js_concordance}>
+ <a href="./#{@md.file.base_filename.html_concordance}" #{@vz.js_concordance}>
<i>Concordance</i>
</a>
</h4>
@@ -431,7 +431,7 @@ WOK
Quick Ref.:
</li>
<li class="ref">
- <a href="#{@md.fn[:manifest]}" alt="Document Manifest" target="_top">
+ <a href="#{@md.file.base_filename.manifest}" alt="Document Manifest" target="_top">
Manifest
</a>
</li>
@@ -452,7 +452,7 @@ WOK
Quick Ref.:
</li>
<li class="ref">
- <a href="#{@md.fn[:manifest]}" alt="Document Manifest" target="_top">
+ <a href="#{@md.file.base_filename.manifest}" alt="Document Manifest" target="_top">
Manifest
</a>
</li>
@@ -553,10 +553,6 @@ WOK
</h4>
#{@vz.table_close}}
end
- def seg_metadata
- @metalink=%{./#{@md.fn[:metadata]}}
- metadata
- end
def seg_tail
%{
<div class="main_column">
@@ -625,24 +621,6 @@ WOK
def initialize(md) #(md='')
super(md)
end
- def head
- rdf=SiSU_XML_Tags::RDF.new(@md)
- %{#{doc_type}
-<head>
- <title>
- #{@seg_name_html[@seg_name_html_tracker]} -
- #{@md.html_title}
- </title>
-<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
-#{rdf.metatag_html}
-#{@vz.font_css_table_file}
-</head>
-#{@vz.color_body}
-<a name="top" id="top"></a>
-<a name="up" id="up"></a>
-<a name="start" id="start"></a>
-#{@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}"
%{<table summary="segment hidden control pre" width="100%" border="0" cellpadding="0" bgcolor=#{@vz.color_grey_pale} align="center">
<tr><td align="left">
<a href="#{pre}" target="_top" #{@vz.js_prev}>
@@ -738,7 +716,7 @@ WOK
end
def manifest_link(text)
%{<font size=2>
- <a href="#{@md.fn[:manifest]}" target="_top" #{@vz.js_manifest}>
+ <a href="#{@md.file.base_filename.manifest}" target="_top" #{@vz.js_manifest}>
#{text}
</a>
</font>}
@@ -746,7 +724,7 @@ WOK
def concordance_link(text)
if @md.concord_make
%{<font size=2>
- <a href="#{@md.fn[:concordance]}" target="_top" #{@vz.js_concordance}>
+ <a href="#{@md.file.base_filename.html_concordance}" target="_top" #{@vz.js_concordance}>
#{text}
</a>
</font>}
@@ -865,24 +843,6 @@ WOK
</div>
} #revisit
end
- def head
- rdf=SiSU_XML_Tags::RDF.new(@md)
- %{#{doc_type}
-<head>
- <title>
- #{@seg_name_html[@seg_name_html_tracker]} -
- #{@md.html_title}
- </title>
-<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
-#{rdf.metatag_html}
-#{@css.html}
-</head>
-#{@vz.color_body}
-<a name="top" id="top"></a>
-<a name="up" id="up"></a>
-<a name="start" id="start"></a>
-#{@vz.js_top}}
- end
def head_seg
rdf=SiSU_XML_Tags::RDF.new(@md)
%{#{doc_type}
@@ -901,10 +861,6 @@ WOK
<a name="start" id="start"></a>
#{@vz.js_top}}
end
- def toc_metadata
- @metalink=%{./#{@md.fn[:meatadata]}}
- toc_metadata
- end
def title_banner(title,subtitle,creator)
%{
<div class="summary">
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] << %{<text:p text:style-name="P_normal">Available document outputs: <br /> &lt;<text:a xlink:type="simple" xlink:href="#{manifest}">#{manifest}</text:a>&gt;</text:p>}
@@odf[:tail] << %{\n<text:p text:style-name="P_normal">SiSU: &lt;<text:a xlink:type="simple" xlink:href="http://www.jus.uio.no/lm">www.jus.uio.no/sisu</text:a>&gt; and &lt;<text:a xlink:type="simple" xlink:href="http://www.sisudoc.org">www.sisudoc.org</text:a>&gt;</text:p>}
@@odf[:tail] << "\n</office:text></office:body></office:document-content>"
@@ -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] <<<<WOK
#{@br}
plaintext (plain text):
- #{base_url}/#{@md.fn[:plain]}#{@br}
+ #{@md.file.output_path.txt.url}/#{@md.file.base_filename.txt}#{@br}
Other versions of this document: #{@br}
manifest:
- #{base_url}/#{@md.fn[:manifest]}#{@br}
+ #{@md.file.output_path.manifest.url}/#{@md.file.base_filename.manifest}#{@br}
at:
- #{@env.url.root}#{@br}
+ #{@md.file.output_path.base.url}#{@br}
#{sc}
* #{generator}
diff --git a/lib/sisu/v3dv/shared_metadata.rb b/lib/sisu/v3dv/shared_metadata.rb
index 56856116..14cc885a 100644
--- a/lib/sisu/v3dv/shared_metadata.rb
+++ b/lib/sisu/v3dv/shared_metadata.rb
@@ -1001,7 +1001,7 @@ WOK
language=l[:n]
tr=SiSU_Translate::Source.new(@md,language)
tag="Document Manifest @"
- inf="#{@br}#{base_html}/#{@md.fn[:manifest]}"
+ inf="#{@br}#{@md.file.output_path.manifest.url}/#{@md.file.base_filename.manifest}"
meta << meta_para(tag,inf)
if defined? @md.title.full \
and @md.title.full=~/\S+/
diff --git a/lib/sisu/v3dv/texinfo_format.rb b/lib/sisu/v3dv/texinfo_format.rb
index 30d40e20..ed9769fc 100644
--- a/lib/sisu/v3dv/texinfo_format.rb
+++ b/lib/sisu/v3dv/texinfo_format.rb
@@ -98,7 +98,6 @@ module SiSU_TexInfoFormat
v=SiSU_Env::InfoVersion.instance.get_version
head =<<WOK
\\input texinfo @c -*-texinfo-*-
-@comment $Id$
@comment %**start of header
@setfilename #{@md.fnb}.info
@settitle #{title} @value{VERSION}
diff --git a/lib/sisu/v3dv/texpdf_format.rb b/lib/sisu/v3dv/texpdf_format.rb
index 2eddf72c..b82bf687 100644
--- a/lib/sisu/v3dv/texpdf_format.rb
+++ b/lib/sisu/v3dv/texpdf_format.rb
@@ -1549,16 +1549,6 @@ Generated by \\href{http://www.jus.uio.no/sisu}{SiSU www.jus.uio.no/sisu } \\\\
\\end{small}}&
WOK
end
- def manifest_info
- url=@md.fnb.gsub(/(?:\\)*([$&~%_#}{^])/,'\\\\\1')
- fn=@md.fn[:manifest].gsub(/(?:\\)*([$&~%_#}{^])/,'\\\\\1')
-<<WOK
-{\\begin{footnotesize}
-\\\\ For alternative output formats of this document check:
-\\\\ #{@brace_url.tex_open}\\begin{scriptsize}\\href{#{@vz.url_root_http}/#{url}/#{fn}}{#{@vz.url_root_http}/#{url}/#{fn}}\\end{scriptsize}#{@brace_url.tex_close}
-\\end{footnotesize}}&
-WOK
- end
def endnotes #not used should be inserted before MetaData section which preceeds doc_tail, but is "part of document"
<<WOK
\\subsection*{Endnotes}
diff --git a/lib/sisu/v3dv/update.rb b/lib/sisu/v3dv/update.rb
index 12597c99..f4ad275c 100644
--- a/lib/sisu/v3dv/update.rb
+++ b/lib/sisu/v3dv/update.rb
@@ -83,42 +83,48 @@ module SiSU_UpdateControlFlag
@env=SiSU_Env::InfoEnv.new(@md.fns)
out=@env.path.output
@base_path="#{out}/#{@md.fnb}"
+ @pdf_fn=SiSU_Env::FileOp.new(@md).base_filename
end
def set_flags #-mNhwpoabxXyv
flag='-v'
- if FileTest.file?("#{@base_path}/#{@md.fn[:doc]}")==true
+ if FileTest.file?("#{@md.file.output_path.txt.dir}/#{@md.file.base_filename.txt}")==true
flag=flag + 'a'
end
- if FileTest.file?("#{@base_path}/#{@md.fn[:toc]}")==true \
- or FileTest.file?("#{@base_path}/#{@md.fn[:doc]}")==true
+ if FileTest.file?("#{@md.file.output_path.html_seg.dir}/#{@md.file.base_filename.html_seg}")==true
+ or FileTest.file?("#{@md.file.output_path.html_scroll.dir}/#{@md.file.base_filename.html_scroll}")==true
flag=flag + 'h'
end
- if FileTest.file?("#{@base_path}/#{@md.fn[:xhtml]}")==true
+ if FileTest.file?("#{@md.file.output_path.xhtml.dir}/#{@md.file.base_filename.xhtml}")==true
flag=flag + 'b'
end
- if FileTest.file?("#{@base_path}/#{@md.fn[:sax]}")==true
+ if FileTest.file?("#{@md.file.output_path.xml_sax.dir}/#{@md.file.base_filename.xml_sax}")==true
flag=flag + 'x'
end
- if FileTest.file?("#{@base_path}/#{@md.fn[:dom]}")==true
+ if FileTest.file?("#{@md.file.output_path.xml_dom.dir}/#{@md.file.base_filename.xml_dom}")==true
flag=flag + 'X'
end
- if FileTest.file?("#{@base_path}/#{@md.fn[:odf]}")==true
+ if FileTest.file?("#{@md.file.output_path.epub.dir}/#{@md.file.base_filename.epub}")==true
+ flag=flag + 'e'
+ end
+ if FileTest.file?("#{@md.file.output_path.odt.dir}/#{@md.file.base_filename.odt}")==true
flag=flag + 'o'
end
- if FileTest.file?("#{@base_path}/#{@md.fn[:pdf_p]}")==true \
- or FileTest.file?("#{@base_path}/#{@md.fn[:pdf_l]}")==true
+ if FileTest.file?("#{@md.file.output_path.pdf.dir}/#{@pdf_fn.pdf_p_a4}")==true \
+ or FileTest.file?("#{@md.file.output_path.pdf.dir}/#{@pdf_fn.pdf_l_a4}")==true \
+ or FileTest.file?("#{@md.file.output_path.pdf.dir}/#{@pdf_fn.pdf_p_letter}")==true \
+ or FileTest.file?("#{@md.file.output_path.pdf.dir}/#{@pdf_fn.pdf_l_letter}")==true
flag=flag + 'p'
end
- if FileTest.file?("#{@base_path}/#{@md.fn[:concordance]}")==true
+ if FileTest.file?("#{@md.file.output_path.html_concordance.dir}/#{@md.file.base_filename.html_concordance}")==true
flag=flag + 'w'
end
- if FileTest.file?("#{@base_path}/#{@md.fn[:digest]}")==true
+ if FileTest.file?("#{@md.file.output_path.digest.dir}/#{@md.file.base_filename.digest}")==true
flag=flag + 'N'
end
- if FileTest.file?("#{@base_path}/#{@md.fns}")==true
+ if FileTest.file?("#{@md.file.output_path.src.dir}/#{@md.file.base_filename.src}")==true
flag=flag + 's'
end
- if FileTest.file?("#{@base_path}/sisupod.tgz")==true
+ if FileTest.file?("#{@md.file.output_path.sisupod.dir}/#{@md.file.base_filename.sisupod}")==true
flag=flag + 'S'
end
puts flag
diff --git a/lib/sisu/v3dv/xhtml.rb b/lib/sisu/v3dv/xhtml.rb
index bf1c964a..050e16d8 100644
--- a/lib/sisu/v3dv/xhtml.rb
+++ b/lib/sisu/v3dv/xhtml.rb
@@ -83,9 +83,10 @@ module SiSU_XHTML
unless @opt.cmd =~/q/
path=@env.path.output_tell
loc=@env.url.output_tell
-
- tool=if @opt.cmd =~/[MV]/; "#{@env.program.web_browser} file://#{@md.file.output_path.xhtml.dir}/#{@md.file.base_filename.xhtml}#{path}/#{@md.fnb}/#{@md.fn[:xhtml]}\n\t#{@env.program.xml_viewer} file://#{@md.file.output_path.xhtml.dir}/#{@md.file.base_filename.xhtml}#{path}/#{@md.fnb}/#{@md.fn[:xhtml]}"
- elsif @opt.cmd =~/v/; "#{@env.program.web_browser} file://#{@md.file.output_path.xhtml.dir}/#{@md.file.base_filename.xhtml}"
+ tool=if @opt.cmd =~/[MV]/
+ "#{@env.program.web_browser} file://#{@md.file.output_path.xhtml.dir}/#{@md.file.base_filename.xhtml}"
+ elsif @opt.cmd =~/v/
+ "#{@env.program.web_browser} file://#{@md.file.output_path.xhtml.dir}/#{@md.file.base_filename.xhtml}"
else "[#{@opt.f_pth[:lng_is]}] #{@opt.fns}"
end
@opt.cmd=~/[MVvz]/ \
diff --git a/lib/sisu/v3dv/xml_format.rb b/lib/sisu/v3dv/xml_format.rb
index db3e8f25..71a0bd68 100644
--- a/lib/sisu/v3dv/xml_format.rb
+++ b/lib/sisu/v3dv/xml_format.rb
@@ -406,89 +406,6 @@ WOK
</html>}
end
end
- class Widget < HeadInformation
- def initialize(md)
- super(md)
- @md=md
- @cf_defaults=SiSU_Env::InfoProcessingFlag.new
- end
- def home
- %{<td align="center" bgcolor=#{@vz.color_band2}>
- <a href="../index.html" target="_top">
- #{@vz.png_homepage}</a>
-</td>
-}
- end
- def scroll(text)
- if @md.fns =~ /\.(?:-|ssm\.)?sst$/
- scroll=%{<td align="center" bgcolor=#{@vz.color_band2}>
- <a href="#{@md.fn[:doc]}" target="_top" #{@vz.js_doc}>
- #{text}
- </a>
-</td>
-}
- end
- end
- def seg(text)
- %{<td align="center" bgcolor="#99CC66">
- <a href="#{@md.fn[:toc]}" target="_top" #{@vz.js_doc}>
- #{text}
- </a>
-</td>
-}
- end
- def search
- env=SiSU_Env::InfoEnv.new(@md.fns,@md)
- env.widget.search_form('sisusearch',nil,nil,true)
- end
- def manifest
- %{<td align="center" bgcolor=#{@vz.color_band2}>
- <a href="#{@md.fn[:manifest]}" target="_top" #{@vz.js_manifest}>
- #{@vz.nav_txt_manifest}
- </a>
-</td>}
- end
- def pdf
- pdf=if @md.programs[:pdf] \
- and @cf_defaults.cf_0 =~/p/
- %{
-<td align="center" bgcolor=#{@vz.color_band2}>
- <a href="#{@md.fn[:pdf_p]}" target="_top" #{@vz.js_portrait}>
- #{@vz.nav_txt_pdf_portrait}
- </a>
-</td>
-<td align="center" bgcolor=#{@vz.color_band2}>
- <a href="#{@md.fn[:pdf_l]}" target="_top" #{@vz.js_landscape}>
- #{@vz.nav_txt_pdf_landscape}
- </a>
-</td>
-}
- else ''
- end
- end
- def odf
- odf=if @cf_defaults.cf_0 =~/o/
- %{
-<td align="center" bgcolor=#{@vz.color_band2}>
- <a href="#{@md.fn[:odf]}" target="_top" #{@vz.js_odf}>
- #{@vz.nav_txt_odf}
- </a>
-</td>}
- 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
- %{<td align="center" bgcolor=#{@vz.color_band2}>
- <a href="#{@md.fn[:concordance]}" target="_top" #{@vz.js_concordance}>
- #{text}
- </a>
- </td>}
- else ''
- end
- end
- end
class XML
end
class HeadToc < HeadInformation
@@ -571,21 +488,6 @@ WOK
#{@vz.table_close}
<p />}
end
- def manifest_link(text)
- %{<font size=2>
- <a href="#{@md.fn[:manifest]}" target="_top" #{@vz.js_manifest}>#{text}</a>
- </font>}
- end
- def concordance_link(text)
- if @md.concord_make
- %{<font size=2>
- <a href="#{@md.fn[:concordance]}" target="_top" #{@vz.js_concordance}>
- #{text}
- </a>
- </font>}
- else ''
- end
- end
def make_seg_scroll_pdf
wgt=Widget.new(@md)
scroll=%{<td align="center" bgcolor=#{@vz.color_band2}>
@@ -650,60 +552,6 @@ WOK
<a name="start" id="start"></a>
#{@vz.js_top}}
end
- def concordance
- if @md.concord_make
- %{#{@vz.margin_css}
- <h4 class="toc">
- <a href="./#{@md.fn[:concordance]}" #{@vz.js_concordance}>
- <i>Concordance</i>
- </a>
- </h4>
-#{@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)
- %{
-<div id="vertical_links">
- <ul id="vertical">
- <li class="refbold">
- <a href="#{url}" #{@vz.js_home}>
- #{@vz.txt_hp}
- </a>
- </li>
- <li class="ref">
- Quick Ref.:
- </li>
- <li class="ref">
- <a href="#{@md.fn[:manifest]}" target="_top">
- Manifest
- </a>
- </li>
-<!- quick ref -!>}
- end
- def links_guide_horizontal_open #???
- url=(((defined? @vz.url_hp) && @vz.url_hp =~/^https?:\/\/\S+$/) ? @vz.url_hp : @vz.url_home)
- %{
-<div id="horizontal_links">
- <ul id="horizontal">
- <li class="refbold">
- <a href="#{url}" #{@vz.js_home}>
- #{@vz.txt_hp}
- </a>
- </li>
- <li class="ref">
- Quick Ref.:
- </li>
- <li class="ref">
- <a href="#{@md.fn[:manifest]}" target="_top">
- Manifest
- </a>
- </li>
-<!- quick ref -!>}
- end
def links_guide_open(type='horizontal')
if type=='vertical'; links_guide_vertical_open
else links_guide_horizontal_open
@@ -795,10 +643,6 @@ WOK
</h4>
#{@vz.table_close}}
end
- def seg_metadata
- @metalink=%{./#{@md.fn[:metadata]}}
- metadata
- end
def seg_tail
%{
<div class="main_column">
@@ -906,24 +750,6 @@ WOK
</a>
#{@vz.table_close}}
end
- def dot_control_pre
- %{<table summary="segment hidden control pre" width="100%" border="0" cellpadding="0" bgcolor=#{@vz.color_grey_pale} align="center">
-<tr><td align="left">
- <a href="#{@seg_name_html[@seg_name_html_tracker-2]}#{@md.lang_code_insert}#{Sfx[:xhtml]}" target="_top" #{@vz.js_prev}>
- #{@vz.png_nav_dot_pre}
- </a>
-</td>
-<td align="center">
- <a href="#{@index}#{@md.lang_code_insert}#{Sfx[:xhtml]}" target="_top" #{@vz.js_toc}>
- #{@vz.png_nav_dot_toc}
- </a>
-</td>
-<td align="right">
- <a href="#{@md.fn[:toc]}" target="_top" #{@vz.js_next}>
- #{@vz.png_nav_dot_nxt}
- </a>
-#{@vz.table_close}}
- end
def toc_nav(f_pre=false,f_nxt=false,use=1)
pre=nxt=''
toc=%{<td align="center" bgcolor=#{@vz.color_band1}>
@@ -959,23 +785,6 @@ WOK
def toc_pre2
toc_nav(true,false,2).dup
end
- def manifest_link(text)
- %{<font size=2>
- <a href="#{@md.fn[:manifest]}" target="_top" #{@vz.js_manifest}>
- #{text}
- </a>
- </font>}
- end
- def concordance_link(text)
- if @md.concord_make
- %{<font size=2>
- <a href="#{@md.fn[:concordance]}" target="_top" #{@vz.js_concordance}>
- #{text}
- </a>
- </font>}
- else ''
- end
- end
def doc_types #used in seg_nav_band ###
scroll=seg=''
wgt=Widget.new(@md)
@@ -1137,10 +946,6 @@ WOK
<a name="start" id="start"></a>
#{@vz.js_top}}
end
- def toc_metadata
- @metalink=%{./#{@md.fn[:meatadata]}}
- toc_metadata
- end
def title_banner(title,subtitle,creator)
%{
<div class="summary">