diff options
| author | Ralph Amissah <ralph@amissah.com> | 2011-05-23 21:42:51 -0400 | 
|---|---|---|
| committer | Ralph Amissah <ralph@amissah.com> | 2011-05-23 21:47:08 -0400 | 
| commit | eebc0d4f7af96cb387955cc25c0059f2e9dd63d3 (patch) | |
| tree | a3cd69dd2256485981a0713c1f768939d16fa7b5 /lib | |
| parent | v3: param, html, epub, xml, simplify file-naming with language code (diff) | |
v3: manifest, sysenv, "available outputs" relative paths; available languages
* relative paths to "available outputs" (for each dir structure), fix
* show language versions published
  (needs 2 runs for manifest, polls output as to whether manifest exists)
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/sisu/v3/manifest.rb | 434 | ||||
| -rw-r--r-- | lib/sisu/v3/sysenv.rb | 408 | 
2 files changed, 529 insertions, 313 deletions
| diff --git a/lib/sisu/v3/manifest.rb b/lib/sisu/v3/manifest.rb index 90f8df55..0c6d5460 100644 --- a/lib/sisu/v3/manifest.rb +++ b/lib/sisu/v3/manifest.rb @@ -67,6 +67,7 @@ module SiSU_Manifest      include SiSU_HTML_Format    require_relative 'param'                              # param.rb      include SiSU_Param +  require_relative 'i18n'                               # i18n.rb    include SiSU_Viz    class Source      def initialize(opt) @@ -101,11 +102,11 @@ module SiSU_Manifest        def initialize(md)          @manifest={ txt: [], html: [] }          @md,@fns=md,md.fns -#       @file=SiSU_Env::SiSU_file.new(@md)          @env=SiSU_Env::Info_env.new(@md.fns)          @fnb=@md.fnb          @base_url="#{@env.url.root}/#{@fnb}" -        @base_path=@md.file.output_path.manifest.dir +        @f=SiSU_Env::SiSU_file.new(@md) +        @base_path=@f.output_path.manifest.dir          @@dg ||=SiSU_Env::Info_env.new.digest.type          @dg=@@dg          l=SiSU_Env::Standardise_language.new(@md.opt.lng).language @@ -114,26 +115,26 @@ module SiSU_Manifest          @brace_url=SiSU_Viz::Skin.new.url_decoration        end        def output -        manifest=@md.file.write_file.manifest +        manifest=@f.write_file.manifest          @manifest[:html].each do |x| -          x.gsub!(Xx[:html_relative2],@md.file.path_rel_links.html_scroll_2) -          x.gsub!(Xx[:html_relative1],@md.file.path_rel_links.html_scroll_1) +          x.gsub!(Xx[:html_relative2],@f.path_rel_links.html_scroll_2) +          x.gsub!(Xx[:html_relative1],@f.path_rel_links.html_scroll_1)            manifest << x          end        end -      def summarize(id,file,pth='',url='',img='● ') +      def summarize(id,file,pth='',rel='',url='',img='● ')          size=(File.size("#{pth}/#{file}")/1024.00).to_s          kb=/([0-9]+\.[0-9]{0,1})/m.match(size)[1]          @manifest[:txt] << "#{file} #{id} #{kb}\n" -        @manifest[:html] << %{<tr><th class="left"><p class="norm"><a href="#{pth}/#{file}">#{img}#{id}</a></p></th><td><p class="small"><a href="#{pth}/#{file}">#{file}</a></p><p class="tiny">#{@brace_url.xml_open}<a href="#{url}/#{file}">#{url}/#{file}</a>#{@brace_url.xml_close}</p></td><td class="right"><p class="right">#{kb}</p></td></tr>\n} +        @manifest[:html] << %{<tr><th class="left"><p class="norm"><a href="#{rel}/#{file}">#{img}#{id}</a></p></th><td><p class="small"><a href="#{rel}/#{file}">#{file}</a></p><p class="tiny">#{@brace_url.xml_open}<a href="#{url}/#{file}">#{url}/#{file}</a>#{@brace_url.xml_close}</p></td><td class="right"><p class="right">#{kb}</p></td></tr>\n}        end -      def summarize_html_seg(id,file,pth='',url='',img='● ') +      def summarize_html_seg(id,file,pth='',rel='',url='',img='● ')          size=(File.size("#{pth}/#{file}")/1024.00).to_s          kb=/([0-9]+\.[0-9]{0,1})/m.match(size)[1]          @manifest[:txt] << "#{file} #{id} #{kb}\n" -        @manifest[:html] << %{<tr><th class="left"><p class="norm"><a href="#{pth}/#{file}">#{img}#{id}</a></p></th><td><p class="small"><a href="#{pth}/#{file}">#{file}</a></p><p class="tiny">#{@brace_url.xml_open}<a href="#{url}/#{file}">#{url}/#{file}</a>#{@brace_url.xml_close}</p></td><td class="right"><p class="right">#{kb}</p></td></tr>\n} +        @manifest[:html] << %{<tr><th class="left"><p class="norm"><a href="#{rel}/#{file}">#{img}#{id}</a></p></th><td><p class="small"><a href="#{rel}/#{file}">#{file}</a></p><p class="tiny">#{@brace_url.xml_open}<a href="#{url}/#{file}">#{url}/#{file}</a>#{@brace_url.xml_close}</p></td><td class="right"><p class="right">#{kb}</p></td></tr>\n}        end -      def summarize_sources(id,file,pth,url) +      def summarize_sources(id,file,pth,rel,url)          sys=SiSU_Env::System_call.new          dgst =if @dg =~/^sha(?:2|256)$/; sys.sha256("#{pth}/#{file}")          else                             sys.md5("#{pth}/#{file}") @@ -142,25 +143,62 @@ module SiSU_Manifest          size=(File.size("#{pth}/#{file}")/1024.00).to_s          kb=/([0-9]+\.[0-9]{0,1})/m.match(size)[1]          @manifest[:txt] << "#{file} #{id} #{kb}\n" -        @manifest[:html] << %{<tr><th class="left"><p class="norm"><a href="#{pth}/#{file}">#{id}</a></p></th><td class="right"><p class="tiny"><a href="#{pth}/#{file}">#{file}</a>   #{dgst[1]}<br />#{@brace_url.xml_open}<a href="#{url}/#{file}">#{url}/#{file}</a>#{@brace_url.xml_close}</p></td><td class="right"><p class="right">#{kb}</p> +        @manifest[:html] << %{<tr><th class="left"><p class="norm"><a href="#{rel}/#{file}">#{id}</a></p></th><td class="right"><p class="tiny"><a href="#{rel}/#{file}">#{file}</a>   #{dgst[1]}<br />#{@brace_url.xml_open}<a href="#{url}/#{file}">#{url}/#{file}</a>#{@brace_url.xml_close}</p></td><td class="right"><p class="right">#{kb}</p>          </td></tr>\n} if kb and kb =~/\d+/        end +      def published_manifests? +        @f=SiSU_Env::SiSU_file.new(@md) #.base_filename +        @m=[] +        url=@f.output_path.base.url +        manifests={} +        mp,mn,mt,mr=nil,nil,nil,nil +        ln=SiSU_i18n::Languages.new.list +        Px[:lng_lst].each do |lc| +          if @env.output_dir_structure.by_language_code? +            mp="#{@f.output_path.base.dir}/#{lc}/manifest" +            mn="#{@md.fnb}.html" +            mt="#{mp}/#{mn}" +            mr="../../#{lc}/manifest/#{mn}" +            mu="#{url}/#{lc}/manifest/#{mn}" +          elsif @env.output_dir_structure.by_filetype? +            mp="#{@f.output_path.base.dir}/manifest" +            mn="#{@md.fnb}.#{lc}.html" +            mt="#{mp}/#{mn}" +            mr=mn +            mu="#{url}/manifest/#{mn}" +          else +            mp="#{@f.output_path.base.dir}/#{@md.fnb}" +            mn="sisu_manifest.#{lc}.html" +            mt="#{mp}/#{mn}" +            mr=mn +            mu="#{url}/#{mn}" +          end +          if FileTest.directory?(mp) \ +          &&  FileTest.file?(mt) +            lng=ln[lc][:t] +            manifests[lc]={ ln: lng, fn: mn, rel: mr } +            @m << { mu: mu, l: lng, rel: mr } +          end +        end +        manifests +        @m.uniq! +        @m +      end        def languages(id,file) -        flv=@env.published_manifests?(@base_path) +        flv=published_manifests?          @manifest[:html] << %{<tr><th class="left"><div id="horizontal_links"><ul id="horizontal">\n}          flv.each do |l|            lang=SiSU_Translate::Source.new(@md,@language,l[:n]).language_list -          @manifest[:txt] << "#{l[:m]} #{lang}\n" -          @manifest[:html] << %{<li class="norm"><a href="#{l[:m]}">#{lang}</a>   </li>} +          @manifest[:txt] << "#{l[:mu]} #{l[:l]}\n" +          @manifest[:html] << %{<li class="norm"><a href="#{l[:rel]}">#{l[:l]}</a>   </li>}          end          @manifest[:html] << %{</ul></div></th></tr>\n}        end        def published_languages(id,file) -        flv=@env.published_manifests?(@base_path) +        flv=published_manifests?          flv.each do |l| -          lang=SiSU_Translate::Source.new(@md,@language,l[:n]).language_list -          @manifest[:txt] << "#{l[:m]} #{lang}\n" -          @manifest[:html] << %{<tr><th class="left"><p class="bold"><a href="#{l[:m]}">#{lang}</a></p></th><td><p class="norm">#{lang}</p><p class="tiny">#{@brace_url.xml_open}<a href="#{@base_url}/#{l[:m]}">#{@base_url}/#{l[:m]}</a>#{@brace_url.xml_close}</p></td><td class="right"><p class="right"> </p></td></tr>\n} +          @manifest[:txt] << "#{l[:mu]} #{l[:l]}\n" +          @manifest[:html] << %{<tr><th class="left"><p class="bold"><a href="#{l[:mu]}">#{l[:l]}</a></p></th><td><p class="norm">#{l[:l]}</p><p class="tiny">#{@brace_url.xml_open}<a href="#{l[:mu]}">#{l[:mu]}</a>#{@brace_url.xml_close}</p></td><td class="right"><p class="right"> </p></td></tr>\n}          end        end        def metadata(id,info) @@ -175,173 +213,191 @@ module SiSU_Manifest          @manifest[:html] << %{<tr><th class="right" width=5%><p class="norm">●</p></th><td class="left"><p class="norm"><a href="#{url}">#{lnk}</a></p><p class="tiny">  #{@brace_url.xml_open}<a href="#{static}">#{static}</a>#{@brace_url.xml_close}</p></td></tr>\n}        end        def output_tests -        if FileTest.file?(@md.file.place_file.html_segtoc.dir)==true -          img=%{<img border="0" height="18" width="15" src="#{@md.file.path_rel_links.html_scroll_2}_sisu/image_sys/b_toc.png" alt="TOC linked" /> } -          pth=@md.file.output_path.html_seg.dir -          url=@md.file.output_path.html_seg.url -          id,file='HTML, table of contents (for segmented text)',@md.file.base_filename.html_segtoc -          summarize_html_seg(id,file,pth,url,img) -        end -        if FileTest.file?(@md.file.place_file.html_scroll.dir)==true -          img=%{<img border="0" height="15" width="15" src="#{@md.file.path_rel_links.html_scroll_2}_sisu/image_sys/b_doc.png" alt="Full Text" /> } -          pth=@md.file.output_path.html_scroll.dir -          url=@md.file.output_path.html_scroll.url -          id,file='HTML, full length document',@md.file.base_filename.html_scroll -          summarize(id,file,pth,url,img) -        end -        if FileTest.file?(@md.file.place_file.html_book_index.dir)==true -          pth=@md.file.output_path.html_seg.dir -          url=@md.file.output_path.html_seg.url -          id,file='HTML, (book type) index',@md.file.base_filename.html_book_index -          summarize(id,file,pth,url) -        end -        if FileTest.file?(@md.file.place_file.html_concordance.dir)==true -          pth=@md.file.output_path.html_seg.dir -          url=@md.file.output_path.html_seg.url -          id,file='HTML, concordance file',@md.file.base_filename.html_concordance -          summarize(id,file,pth,url) -        end -        if FileTest.file?(@md.file.place_file.epub.dir)==true -          img=%{<img border="0" height="18" width="18" src="#{@md.file.path_rel_links.html_scroll_2}_sisu/image_sys/b_epub.png" alt="EPUB" /> } -          id,file='EPUB (Electronic Publication, e-book standard)',@md.file.base_filename.epub -          pth=@md.file.output_path.epub.dir -          url=@md.file.output_path.epub.url -          summarize(id,file,pth,url,img) -        end -        if FileTest.file?("#{@md.file.output_path.pdf.dir}/#{@md.file.base_filename.pdf_p_letter}")==true -          img=%{<img border="0" height="18" width="15" src="#{@md.file.path_rel_links.html_scroll_2}_sisu/image_sys/b_pdf.png" alt="PDF portrait" /> } -          pth=@md.file.output_path.pdf.dir -          url=@md.file.output_path.pdf.url -          id,file="PDF, U.S. letter size, portrait/vertical document (recommended for printing)","#{@md.file.base_filename.pdf_p_letter}" -          summarize(id,file,pth,url,img) -        end -        if FileTest.file?("#{@md.file.output_path.pdf.dir}/#{@md.file.base_filename.pdf_l_letter}")==true -          img=%{<img border="0" height="15" width="18" src="#{@md.file.path_rel_links.html_scroll_2}_sisu/image_sys/b_pdf.png" alt="PDF landscape" /> } -          pth=@md.file.output_path.pdf.dir -          url=@md.file.output_path.pdf.url -          id,file="PDF, U.S. letter size, landscape/horizontal document (recommended for screen viewing)","#{@md.file.base_filename.pdf_l_letter}" -          summarize(id,file,pth,url,img) -        end -        if FileTest.file?("#{@md.file.output_path.pdf.dir}/#{@md.file.base_filename.pdf_p_a4}")==true -          img=%{<img border="0" height="18" width="15" src="#{@md.file.path_rel_links.html_scroll_2}_sisu/image_sys/b_pdf.png" alt="PDF portrait" /> } -          pth=@md.file.output_path.pdf.dir -          url=@md.file.output_path.pdf.url -          id,file="PDF, A4 size, portrait/vertical document (recommended for printing)","#{@md.file.base_filename.pdf_p_a4}" -          summarize(id,file,pth,url,img) -        end -        if FileTest.file?("#{@md.file.output_path.pdf.dir}/#{@md.file.base_filename.pdf_l_a4}")==true -          img=%{<img border="0" height="15" width="18" src="#{@md.file.path_rel_links.html_scroll_2}_sisu/image_sys/b_pdf.png" alt="PDF landscape" /> } -          pth=@md.file.output_path.pdf.dir -          url=@md.file.output_path.pdf.url -          id,file="PDF, A4 size, landscape/horizontal document (recommended for screen viewing)","#{@md.file.base_filename.pdf_l_a4}" -          summarize(id,file,pth,url,img) -        end -        if FileTest.file?("#{@md.file.output_path.pdf.dir}/#{@md.file.base_filename.pdf_p_a5}")==true -          img=%{<img border="0" height="18" width="15" src="#{@md.file.path_rel_links.html_scroll_2}_sisu/image_sys/b_pdf.png" alt="PDF portrait" /> } -          pth=@md.file.output_path.pdf.dir -          url=@md.file.output_path.pdf.url -          id,file="PDF, A5 (book) size, portrait/vertical document (recommended for printing)","#{@md.file.base_filename.pdf_p_a5}" -          summarize(id,file,pth,url,img) -        end -        if FileTest.file?("#{@md.file.output_path.pdf.dir}/#{@md.file.base_filename.pdf_l_a5}")==true -          img=%{<img border="0" height="15" width="18" src="#{@md.file.path_rel_links.html_scroll_2}_sisu/image_sys/b_pdf.png" alt="PDF landscape" /> } -          pth=@md.file.output_path.pdf.dir -          url=@md.file.output_path.pdf.url -          id,file="PDF, A5 (book) size, landscape/horizontal document (recommended for screen viewing)","#{@md.file.base_filename.pdf_l_a5}" -          summarize(id,file,pth,url,img) -        end -        if FileTest.file?("#{@md.file.output_path.pdf.dir}/#{@md.file.base_filename.pdf_p_b5}")==true -          img=%{<img border="0" height="18" width="15" src="#{@md.file.path_rel_links.html_scroll_2}_sisu/image_sys/b_pdf.png" alt="PDF portrait" /> } -          pth=@md.file.output_path.pdf.dir -          url=@md.file.output_path.pdf.url -          id,file="PDF, B5 (book) size, portrait/vertical document (recommended for printing)","#{@md.file.base_filename.pdf_p_b5}" -          summarize(id,file,pth,url,img) -        end -        if FileTest.file?("#{@md.file.output_path.pdf.dir}/#{@md.file.base_filename.pdf_l_b5}")==true -          img=%{<img border="0" height="15" width="18" src="#{@md.file.path_rel_links.html_scroll_2}_sisu/image_sys/b_pdf.png" alt="PDF landscape" /> } -          pth=@md.file.output_path.pdf.dir -          url=@md.file.output_path.pdf.url -          id,file="PDF, B5 (book) size, landscape/horizontal document (recommended for screen viewing)","#{@md.file.base_filename.pdf_l_b5}" -          summarize(id,file,pth,url,img) -        end -        if FileTest.file?("#{@md.file.output_path.pdf.dir}/#{@md.file.base_filename.pdf_p_legal}")==true -          img=%{<img border="0" height="18" width="15" src="#{@md.file.path_rel_links.html_scroll_2}_sisu/image_sys/b_pdf.png" alt="PDF portrait" /> } -          pth=@md.file.output_path.pdf.dir -          url=@md.file.output_path.pdf.url -          id,file="PDF, U.S. legal size, portrait/vertical document (recommended for printing)","#{@md.file.base_filename.pdf_p_legal}" -          summarize(id,file,pth,url,img) -        end -        if FileTest.file?("#{@md.file.output_path.pdf.dir}/#{@md.file.base_filename.pdf_l_legal}")==true -          img=%{<img border="0" height="15" width="18" src="#{@md.file.path_rel_links.html_scroll_2}_sisu/image_sys/b_pdf.png" alt="PDF landscape" /> } -          pth=@md.file.output_path.pdf.dir -          url=@md.file.output_path.pdf.url -          id,file="PDF, U.S. legal size, landscape/horizontal document (recommended for screen viewing)","#{@md.file.base_filename.pdf_l_legal}" -          summarize(id,file,pth,url,img) -        end -        if FileTest.file?(@md.file.place_file.odt.dir)==true -          img=%{<img border="0" height="18" width="18" src="#{@md.file.path_rel_links.html_scroll_2}_sisu/image_sys/b_odf.png" alt="ODF/ODT" /> } -          pth=@md.file.output_path.odt.dir -          url=@md.file.output_path.odf.url -          id,file='ODF:ODT (Open Document Format)',@md.file.base_filename.odt -          summarize(id,file,pth,url,img) -        end -        if FileTest.file?(@md.file.place_file.xhtml.dir)==true -          pth=@md.file.output_path.xhtml.dir -          url=@md.file.output_path.xhtml.url -          id,file='ODF:ODT (Open Document Format)',@md.file.base_filename.odt -          id,file='XHTML',@md.file.base_filename.xhtml -          summarize(id,file,pth,url) -        end -        if FileTest.file?(@md.file.place_file.xml_sax.dir)==true -          pth=@md.file.output_path.xml_sax.dir -          url=@md.file.output_path.xml_sax.url -          id,file='XML SAX',@md.file.base_filename.xml_sax -          summarize(id,file,pth,url) -        end -        if FileTest.file?(@md.file.place_file.xml_dom.dir)==true -          pth=@md.file.output_path.xml_dom.dir -          url=@md.file.output_path.xml_dom.url -          id,file='XML DOM',@md.file.base_filename.xml_dom -          summarize(id,file,pth,url) -        end -        if FileTest.file?(@md.file.place_file.txt.dir)==true +        if FileTest.file?(@f.place_file.html_segtoc.dir)==true +          img=%{<img border="0" height="18" width="15" src="#{@f.path_rel_links.html_scroll_2}_sisu/image_sys/b_toc.png" alt="TOC linked" /> } +          pth=@f.output_path.html_seg.dir +          rel=@f.output_path.html_seg.rel_sm +          url=@f.output_path.html_seg.url +          id,file='HTML, table of contents (for segmented text)',@f.base_filename.html_segtoc +          summarize_html_seg(id,file,pth,rel,url,img) +        end +        if FileTest.file?(@f.place_file.html_scroll.dir)==true +          img=%{<img border="0" height="15" width="15" src="#{@f.path_rel_links.html_scroll_2}_sisu/image_sys/b_doc.png" alt="Full Text" /> } +          pth=@f.output_path.html_scroll.dir +          rel=@f.output_path.html_scroll.rel_sm +          url=@f.output_path.html_scroll.url +          id,file='HTML, full length document',@f.base_filename.html_scroll +          summarize(id,file,pth,rel,url,img) +        end +        if FileTest.file?(@f.place_file.html_book_index.dir)==true +          pth=@f.output_path.html_seg.dir +          rel=@f.output_path.html_seg.rel_sm +          url=@f.output_path.html_seg.url +          id,file='HTML, (book type) index',@f.base_filename.html_book_index +          summarize(id,file,pth,rel,url) +        end +        if FileTest.file?(@f.place_file.html_concordance.dir)==true +          pth=@f.output_path.html_seg.dir +          rel=@f.output_path.html_seg.rel_sm +          url=@f.output_path.html_seg.url +          id,file='HTML, concordance file',@f.base_filename.html_concordance +          summarize(id,file,pth,rel,url) +        end +        if FileTest.file?(@f.place_file.epub.dir)==true +          img=%{<img border="0" height="18" width="18" src="#{@f.path_rel_links.html_scroll_2}_sisu/image_sys/b_epub.png" alt="EPUB" /> } +          id,file='EPUB (Electronic Publication, e-book standard)',@f.base_filename.epub +          pth=@f.output_path.epub.dir +          rel=@f.output_path.epub.rel_sm +          url=@f.output_path.epub.url +          summarize(id,file,pth,rel,url,img) +        end +        if FileTest.file?("#{@f.output_path.pdf.dir}/#{@f.base_filename.pdf_p_letter}")==true +          img=%{<img border="0" height="18" width="15" src="#{@f.path_rel_links.html_scroll_2}_sisu/image_sys/b_pdf.png" alt="PDF portrait" /> } +          pth=@f.output_path.pdf.dir +          rel=@f.output_path.pdf.rel_sm +          url=@f.output_path.pdf.url +          id,file="PDF, U.S. letter size, portrait/vertical document (recommended for printing)","#{@f.base_filename.pdf_p_letter}" +          summarize(id,file,pth,rel,url,img) +        end +        if FileTest.file?("#{@f.output_path.pdf.dir}/#{@f.base_filename.pdf_l_letter}")==true +          img=%{<img border="0" height="15" width="18" src="#{@f.path_rel_links.html_scroll_2}_sisu/image_sys/b_pdf.png" alt="PDF landscape" /> } +          pth=@f.output_path.pdf.dir +          rel=@f.output_path.pdf.rel_sm +          url=@f.output_path.pdf.url +          id,file="PDF, U.S. letter size, landscape/horizontal document (recommended for screen viewing)","#{@f.base_filename.pdf_l_letter}" +          summarize(id,file,pth,rel,url,img) +        end +        if FileTest.file?("#{@f.output_path.pdf.dir}/#{@f.base_filename.pdf_p_a4}")==true +          img=%{<img border="0" height="18" width="15" src="#{@f.path_rel_links.html_scroll_2}_sisu/image_sys/b_pdf.png" alt="PDF portrait" /> } +          pth=@f.output_path.pdf.dir +          rel=@f.output_path.pdf.rel_sm +          url=@f.output_path.pdf.url +          id,file="PDF, A4 size, portrait/vertical document (recommended for printing)","#{@f.base_filename.pdf_p_a4}" +          summarize(id,file,pth,rel,url,img) +        end +        if FileTest.file?("#{@f.output_path.pdf.dir}/#{@f.base_filename.pdf_l_a4}")==true +          img=%{<img border="0" height="15" width="18" src="#{@f.path_rel_links.html_scroll_2}_sisu/image_sys/b_pdf.png" alt="PDF landscape" /> } +          pth=@f.output_path.pdf.dir +          rel=@f.output_path.pdf.rel_sm +          url=@f.output_path.pdf.url +          id,file="PDF, A4 size, landscape/horizontal document (recommended for screen viewing)","#{@f.base_filename.pdf_l_a4}" +          summarize(id,file,pth,rel,url,img) +        end +        if FileTest.file?("#{@f.output_path.pdf.dir}/#{@f.base_filename.pdf_p_a5}")==true +          img=%{<img border="0" height="18" width="15" src="#{@f.path_rel_links.html_scroll_2}_sisu/image_sys/b_pdf.png" alt="PDF portrait" /> } +          pth=@f.output_path.pdf.dir +          rel=@f.output_path.pdf.rel_sm +          url=@f.output_path.pdf.url +          id,file="PDF, A5 (book) size, portrait/vertical document (recommended for printing)","#{@f.base_filename.pdf_p_a5}" +          summarize(id,file,pth,rel,url,img) +        end +        if FileTest.file?("#{@f.output_path.pdf.dir}/#{@f.base_filename.pdf_l_a5}")==true +          img=%{<img border="0" height="15" width="18" src="#{@f.path_rel_links.html_scroll_2}_sisu/image_sys/b_pdf.png" alt="PDF landscape" /> } +          pth=@f.output_path.pdf.dir +          rel=@f.output_path.pdf.rel_sm +          url=@f.output_path.pdf.url +          id,file="PDF, A5 (book) size, landscape/horizontal document (recommended for screen viewing)","#{@f.base_filename.pdf_l_a5}" +          summarize(id,file,pth,rel,url,img) +        end +        if FileTest.file?("#{@f.output_path.pdf.dir}/#{@f.base_filename.pdf_p_b5}")==true +          img=%{<img border="0" height="18" width="15" src="#{@f.path_rel_links.html_scroll_2}_sisu/image_sys/b_pdf.png" alt="PDF portrait" /> } +          pth=@f.output_path.pdf.dir +          rel=@f.output_path.pdf.rel_sm +          url=@f.output_path.pdf.url +          id,file="PDF, B5 (book) size, portrait/vertical document (recommended for printing)","#{@f.base_filename.pdf_p_b5}" +          summarize(id,file,pth,rel,url,img) +        end +        if FileTest.file?("#{@f.output_path.pdf.dir}/#{@f.base_filename.pdf_l_b5}")==true +          img=%{<img border="0" height="15" width="18" src="#{@f.path_rel_links.html_scroll_2}_sisu/image_sys/b_pdf.png" alt="PDF landscape" /> } +          pth=@f.output_path.pdf.dir +          rel=@f.output_path.pdf.rel_sm +          url=@f.output_path.pdf.url +          id,file="PDF, B5 (book) size, landscape/horizontal document (recommended for screen viewing)","#{@f.base_filename.pdf_l_b5}" +          summarize(id,file,pth,rel,url,img) +        end +        if FileTest.file?("#{@f.output_path.pdf.dir}/#{@f.base_filename.pdf_p_legal}")==true +          img=%{<img border="0" height="18" width="15" src="#{@f.path_rel_links.html_scroll_2}_sisu/image_sys/b_pdf.png" alt="PDF portrait" /> } +          pth=@f.output_path.pdf.dir +          rel=@f.output_path.pdf.rel_sm +          url=@f.output_path.pdf.url +          id,file="PDF, U.S. legal size, portrait/vertical document (recommended for printing)","#{@f.base_filename.pdf_p_legal}" +          summarize(id,file,pth,rel,url,img) +        end +        if FileTest.file?("#{@f.output_path.pdf.dir}/#{@f.base_filename.pdf_l_legal}")==true +          img=%{<img border="0" height="15" width="18" src="#{@f.path_rel_links.html_scroll_2}_sisu/image_sys/b_pdf.png" alt="PDF landscape" /> } +          pth=@f.output_path.pdf.dir +          rel=@f.output_path.pdf.rel_sm +          url=@f.output_path.pdf.url +          id,file="PDF, U.S. legal size, landscape/horizontal document (recommended for screen viewing)","#{@f.base_filename.pdf_l_legal}" +          summarize(id,file,pth,rel,url,img) +        end +        if FileTest.file?(@f.place_file.odt.dir)==true +          img=%{<img border="0" height="18" width="18" src="#{@f.path_rel_links.html_scroll_2}_sisu/image_sys/b_odf.png" alt="ODF/ODT" /> } +          pth=@f.output_path.odt.dir +          rel=@f.output_path.odt.rel_sm +          url=@f.output_path.odf.url +          id,file='ODF:ODT (Open Document Format)',@f.base_filename.odt +          summarize(id,file,pth,rel,url,img) +        end +        if FileTest.file?(@f.place_file.xhtml.dir)==true +          pth=@f.output_path.xhtml.dir +          rel=@f.output_path.xhtml.rel_sm +          url=@f.output_path.xhtml.url +          id,file='ODF:ODT (Open Document Format)',@f.base_filename.odt +          id,file='XHTML',@f.base_filename.xhtml +          summarize(id,file,pth,rel,url) +        end +        if FileTest.file?(@f.place_file.xml_sax.dir)==true +          pth=@f.output_path.xml_sax.dir +          rel=@f.output_path.xml_sax.rel_sm +          url=@f.output_path.xml_sax.url +          id,file='XML SAX',@f.base_filename.xml_sax +          summarize(id,file,pth,rel,url) +        end +        if FileTest.file?(@f.place_file.xml_dom.dir)==true +          pth=@f.output_path.xml_dom.dir +          rel=@f.output_path.xml_dom.rel_sm +          url=@f.output_path.xml_dom.url +          id,file='XML DOM',@f.base_filename.xml_dom +          summarize(id,file,pth,rel,url) +        end +        if FileTest.file?(@f.place_file.txt.dir)==true          if    @md.opt.cmd =~/a/; id='Plaintext (Unix (UTF-8) with footnotes)'          elsif @md.opt.cmd =~/e/; id='Plaintext (Unix (UTF-8) with endnotes)'          elsif @md.opt.cmd =~/A/; id='Plaintext (dos (UTF-8) with footnotes)'          elsif @md.opt.cmd =~/E/; id='Plaintext (dos (UTF-8) with endnotes)'          else                id='Plaintext (UTF-8)'          end -          pth=@md.file.output_path.txt.dir -          url=@md.file.output_path.txt.url -          file=@md.file.base_filename.txt -          summarize(id,file,pth,url) +          pth=@f.output_path.txt.dir +          rel=@f.output_path.txt.rel_sm +          url=@f.output_path.txt.url +          file=@f.base_filename.txt +          summarize(id,file,pth,rel,url)          end          if FileTest.file?("#{@base_path}/#{@md.fns}.tex")==true            id,file='LaTeX (portrait)',"#{@md.fns}.tex" -          pth,url='','' -          summarize(id,file,pth,url) +          pth,rel,url='','','' +          summarize(id,file,pth,rel,url)          end          if FileTest.file?("#{@base_path}/#{@md.fns}.tex")==true            id,file='LaTeX (landscape)',"#{@md.fns}.landscape.tex" -          pth,url='','' -          summarize(id,file,pth,url) +          pth,rel,url='','','' +          summarize(id,file,pth,rel,url)          end          if FileTest.file?("#{@base_path}/#{@md.fn[:digest]}")==true            id,file="Digest/DCC - Document Content Certificate (#{@dg})",@md.fn[:digest]            pth=@base_path -          url='' +          rel,url='',''            #pth='' -          summarize(id,file,pth,url) +          summarize(id,file,pth,rel,url)          end        end        def published_versions -        if FileTest.file?("#{@base_path}/sisu_manifest.html")==true -          id,file='Markup (SiSU source)',@md.fns -          languages(id,file) -        end +        id,file='Markup (SiSU source)',@md.fns +        languages(id,file)        end        def language_versions -        if FileTest.file?(@md.file.place_file.manifest.dir)==true +        if FileTest.file?(@f.place_file.manifest.dir)==true            id,file='Markup (SiSU source)',@md.fns            published_languages(id,file)          end @@ -349,31 +405,35 @@ module SiSU_Manifest        def source_tests          if @md.fns =~/\.ssm\.sst$/                                                  #% decide whether to extract and include requested/required documents            req=@md.fns -          if FileTest.file?(@md.file.place_file.src.dir)==true -            pth=@md.file.output_path.src.dir -            url=@md.file.output_path.src.url -            id,file='Markup Composite File (SiSU source)',@md.file.base_filename.src -            summarize_sources(id,file,pth,url) +          if FileTest.file?(@f.place_file.src.dir)==true +            pth=@f.output_path.src.dir +            rel=@f.output_path.src.rel_sm +            url=@f.output_path.src.url +            id,file='Markup Composite File (SiSU source)',@f.base_filename.src +            summarize_sources(id,file,pth,rel,url)            end          else -          if FileTest.file?(@md.file.place_file.src.dir)==true -            pth=@md.file.output_path.src.dir -            url=@md.file.output_path.src.url -            id,file='Markup (SiSU source)',@md.file.base_filename.src -            summarize_sources(id,file,pth,url) +          if FileTest.file?(@f.place_file.src.dir)==true +            pth=@f.output_path.src.dir +            rel=@f.output_path.src.rel_sm +            url=@f.output_path.src.url +            id,file='Markup (SiSU source)',@f.base_filename.src +            summarize_sources(id,file,pth,rel,url)            end          end -        if FileTest.file?(@md.file.place_file.sisupod.dir)==true -          pth=@md.file.output_path.sisupod.dir -          url=@md.file.output_path.sisupod.url -          id,file='SiSU doc (zip)',@md.file.base_filename.sisupod -          summarize_sources(id,file,pth,url) +        if FileTest.file?(@f.place_file.sisupod.dir)==true +          pth=@f.output_path.sisupod.dir +          rel=@f.output_path.sisupod.rel_sm +          url=@f.output_path.sisupod.url +          id,file='SiSU doc (zip)',@f.base_filename.sisupod +          summarize_sources(id,file,pth,rel,url)          end -        if FileTest.file?(@md.file.place_file.pot.dir)==true -          pth=@md.file.output_path.pot.dir -          url=@md.file.output_path.pot.url -          id,file='SiSU pot',@md.file.base_filename.pot -          summarize_sources(id,file,pth,url) +        if FileTest.file?(@f.place_file.pot.dir)==true +          pth=@f.output_path.pot.dir +          rel=@f.output_path.pot.rel_sm +          url=@f.output_path.pot.url +          id,file='SiSU pot',@f.base_filename.pot +          summarize_sources(id,file,pth,rel,url)          end        end        def metadata_tests @@ -659,8 +719,8 @@ SiSU manifest: #{@md.title.full}  <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />  <meta name="sourcefile" content="#{@md.fns}" />  <link rel="generator" href="http://www.jus.uio.no/sisu" /> -<link rel="shortcut icon" href="#{@md.file.path_rel_links.html_scroll_css}_sisu/image_sys/rb7.ico" /> -<link rel="stylesheet" href="#{@md.file.path_rel_links.html_scroll_css}_sisu/css/html.css" type="text/css" /> +<link rel="shortcut icon" href="#{@f.path_rel_links.html_scroll_css}_sisu/image_sys/rb7.ico" /> +<link rel="stylesheet" href="#{@f.path_rel_links.html_scroll_css}_sisu/css/html.css" type="text/css" />  </head>  <body bgcolor="#ffffff" text="#000000" link="#003090" lang="en" xml:lang="en">  #{banner_table} @@ -669,8 +729,8 @@ WOK              if @env.output_dir_structure.by_language_code? \              or @env.output_dir_structure.by_filetype?                minitoc.gsub!(/<a href="(\S+?)"/m,%{<a href="../html/#{@md.fnb}/\\1"}) -              minitoc.gsub!(/<a href="\.\.\/html\/#{@md.fnb}\/(?:sisu_manifest\.html|#{@md.file.base_filename.manifest})"/m, -              %{<a href="#{@md.file.base_filename.manifest}"}) +              minitoc.gsub!(/<a href="\.\.\/html\/#{@md.fnb}\/(?:sisu_manifest\.html|#{@f.base_filename.manifest})"/m, +              %{<a href="#{@f.base_filename.manifest}"})              end              @manifest[:html] <<<<WOK  <div class="toc"> diff --git a/lib/sisu/v3/sysenv.rb b/lib/sisu/v3/sysenv.rb index 127e4181..df86904b 100644 --- a/lib/sisu/v3/sysenv.rb +++ b/lib/sisu/v3/sysenv.rb @@ -445,6 +445,8 @@ module SiSU_Env            'language'          elsif by_filetype?            'filetype' +        elsif by_filename? +          'filename'          else            'filename'          end @@ -1442,6 +1444,81 @@ WOK        end        self      end +    def path_rel_links +      def html_scroll_2 +        if @env.output_dir_structure.by_language_code? +          '../../' +        elsif @env.output_dir_structure.by_filetype? +          '../' +        else +          '../' +        end +      end +      def html_seg_2 +        if @env.output_dir_structure.by_language_code? +          '../../../' +        elsif @env.output_dir_structure.by_filetype? +          '../../' +        else +          '../' +        end +      end +      def html_scroll_1 +        if @env.output_dir_structure.by_language_code? +          '../' +        elsif @env.output_dir_structure.by_filetype? +          '../' +        else +          './' +        end +      end +      def html_seg_1 +        if @env.output_dir_structure.by_language_code? +          '../../' +        elsif @env.output_dir_structure.by_filetype? +          '../../' +        else +          './' +        end +      end +      def default_output_css +        if @env.output_dir_structure.by_language_code? +          '../../' +        elsif @env.output_dir_structure.by_filetype? +          '../' +        else +          '../' +        end +      end +      def html_scroll_css +        default_output_css +      end +      def xhtml_css +        default_output_css +      end +      def xml_css +        default_output_css +      end +      def html_seg_css +        if @env.output_dir_structure.by_language_code? +          '../../../' +        elsif @env.output_dir_structure.by_filetype? +          '../../' +        else +          '../' +        end +      end +      def manifest_css +        if @env.output_dir_structure.by_language_code? +          '../../_sisu/css' +        elsif @env.output_dir_structure.by_filetype? +          '' +        else +          '../' +        end +      end +      self +    end      def path                                                                     #dir        def home          @sys.home @@ -3028,81 +3105,6 @@ WOK        end        self      end -    def path_rel_links -      def html_scroll_2 -        if @env.output_dir_structure.by_language_code? -          '../../' -        elsif @env.output_dir_structure.by_filetype? -          '../' -        else -          '../' -        end -      end -      def html_seg_2 -        if @env.output_dir_structure.by_language_code? -          '../../../' -        elsif @env.output_dir_structure.by_filetype? -          '../../' -        else -          '../../' -        end -      end -      def html_scroll_1 -        if @env.output_dir_structure.by_language_code? -          '../' -        elsif @env.output_dir_structure.by_filetype? -          '../' -        else -          '/' -        end -      end -      def html_seg_1 -        if @env.output_dir_structure.by_language_code? -          '../../' -        elsif @env.output_dir_structure.by_filetype? -          '../../' -        else -          '/' -        end -      end -      def default_output_css -        if @env.output_dir_structure.by_language_code? -          '../../' -        elsif @env.output_dir_structure.by_filetype? -          '../' -        else -          '../' -        end -      end -      def html_scroll_css -        default_output_css -      end -      def xhtml_css -        default_output_css -      end -      def xml_css -        default_output_css -      end -      def html_seg_css -        if @env.output_dir_structure.by_language_code? -          '../../../' -        elsif @env.output_dir_structure.by_filetype? -          '../../' -        else -          '../' -        end -      end -      def manifest_css -        if @env.output_dir_structure.by_language_code? -          '../../_sisu/css' -        elsif @env.output_dir_structure.by_filetype? -          '' -        else -          '../' -        end -      end -      self -    end      def mkdir #check moved from SiSU_file, existing mkdir        def processing          def dal @@ -3432,110 +3434,117 @@ WOK      end      def base_filename        def txt +        ft='.txt'          if @env.output_dir_structure.by_language_code? -          @md.fnb + '.txt' +          @md.fnb + ft          elsif @env.output_dir_structure.by_filetype? -          @md.fnb + @md.fn[:plain] +          @md.fnb + @md.lang_code_insert + ft          else -          'plain' + @md.fn[:plain] +          'plain' + @md.lang_code_insert + ft          end        end        def html_scroll -        #"#{@md.fnl[:pre]}scroll#{@md.fnl[:mid]}.html#{@md.fnl[:post]}" +        ft='.html'          if @env.output_dir_structure.by_language_code? -          @md.fnb + '.html' +          @md.fnb + ft          elsif @env.output_dir_structure.by_filetype? -          @md.fnb + @md.fn[:html] +          @md.fnb + @md.lang_code_insert + ft          else -          'scroll' + @md.fn[:html] +          'scroll' + @md.lang_code_insert + ft          end        end        def html_seg_index -        #"#{@md.fnl[:pre]}index#{@md.fnl[:mid]}.html#{@md.fnl[:post]}" +        ft='.html'          if @env.output_dir_structure.by_language_code? -          'toc.html' +          'toc' + ft          else -          'index' + @md.fn[:html] +          'index' + @md.lang_code_insert + ft          end        end        def html_segtoc -        #"#{@md.fnl[:pre]}toc#{@md.fnl[:mid]}.html#{@md.fnl[:post]}" +        ft='.html'          if @env.output_dir_structure.by_language_code? -          'toc.html' +          'toc' + ft          else -          'toc' + @md.fn[:html] +          'toc' + @md.lang_code_insert + ft          end        end        def html_book_index +        ft='.html'          if @env.output_dir_structure.by_language_code? -          'book_index.html' +          'book_index' + ft          else -          'book_index.' + @md.fn[:html] +          'book_index' + @md.lang_code_insert + ft          end        end        def html_concordance +        ft='.html'          if @env.output_dir_structure.by_language_code? -          'concordance.html' +          'concordance' + ft          else -          'concordance' + @md.fn[:html] +          'concordance' + @md.lang_code_insert + ft          end        end        def xhtml +        ft= '.xhtml'          if @env.output_dir_structure.by_language_code? -          @md.fnb + '.xhtml' +          @md.fnb + ft          elsif @env.output_dir_structure.by_filetype? -          @md.fnb + '.' + @md.fn[:xhtml] +          @md.fnb + @md.lang_code_insert + ft          else -          'scroll.' + @md.fn[:xhtml] +          'scroll' + @md.lang_code_insert + ft          end        end        def epub +        ft='.epub'          if @env.output_dir_structure.by_language_code? -          @md.fnb + '.epub' +          @md.fnb + ft          else -          @md.fnb + @md.fn[:epub] +          @md.fnb + @md.lang_code_insert + ft          end        end        def odt -        #"#{@md.fnl[:pre]}#{@md.fnb}#{@md.fnl[:mid]}.odt#{@md.fnl[:post]}" +        ft='.odt'          if @env.output_dir_structure.by_language_code? -          @md.fnb + '.odt' +          @md.fnb + ft          elsif @env.output_dir_structure.by_filetype? -          @md.fnb + @md.fn[:odf] +          @md.fnb + @md.lang_code_insert + ft          else -          'opendocument' + @md.fn[:odf] +          'opendocument' + @md.lang_code_insert + ft          end        end        def xml_sax +        ft='.sax.xml'          if @env.output_dir_structure.by_language_code? -          @md.fnb + '.sax.xml' +          @md.fnb + ft          elsif @env.output_dir_structure.by_filetype? -          @md.fnb + '.' + @md.fn[:sax] +          @md.fnb + @md.lang_code_insert + ft          else -          'scroll.' + @md.fn[:sax] +          'scroll' + @md.lang_code_insert + ft          end        end        def xml_dom +        ft='.dom.xml'          if @env.output_dir_structure.by_language_code? -          @md.fnb + '.dom.xml' +          @md.fnb + ft          elsif @env.output_dir_structure.by_filetype? -          @md.fnb + '.' + @md.fn[:dom] +          @md.fnb + @md.lang_code_insert + ft          else -          'scroll.' + @md.fn[:dom] +          'scroll' + @md.lang_code_insert + ft          end        end        def pdf_p          if @env.output_dir_structure.by_language_code? \          or @env.output_dir_structure.by_filetype?            @md.fnb + '.portrait.' -        else 'portrait.' +        else 'portrait' + @md.lang_code_insert + '.'          end        end        def pdf_l          if @env.output_dir_structure.by_language_code? \          or @env.output_dir_structure.by_filetype?            @md.fnb + '.landscape.' -        else 'landscape.' +        else 'landscape' + @md.lang_code_insert + '.'          end        end        def pdf_p_a4 @@ -3569,43 +3578,47 @@ WOK          pdf_l + @md.fn[:pdf_l_legal]        end        def manpage +        ft='.1'          if @env.output_dir_structure.by_language_code? -          @md.fnb + '.1' +          @md.fnb + ft          else -          @md.fnb + '.' + @md.fn[:manpage] +          @md.fnb + @md.lang_code_insert + ft          end        end        def hash_digest +        ft='.txt'          if @env.output_dir_structure.by_language_code? -          @md.fnb + '.hash_digest.txt' +          @md.fnb + '.hash_digest' + ft          elsif @env.output_dir_structure.by_filetype? -          @md.fnb + '.' + @md.fn[:digest] +          @md.fnb + @md.lang_code_insert + ft          else -          'digest.' + @md.fn[:digest] +          'digest' + @md.lang_code_insert + ft          end        end        def sitemap +        ft='.xml'          if @env.output_dir_structure.by_language_code? -          @md.fnb + '.sitemap.xml' +          @md.fnb + '.sitemap' + ft          elsif @env.output_dir_structure.by_filetype? -          @md.fnb + '.' + @md.fn[:sitemap] +          @md.fnb + @md.lang_code_insert + ft          else -          'sitemap.' + @md.fn[:sitemap] +          'sitemap' + @md.lang_code_insert + ft          end        end        def manifest +        ft='.html'          if @env.output_dir_structure.by_language_code? -          @md.fnb + '.manifest.html' +          @md.fnb + ft          elsif @env.output_dir_structure.by_filetype? -          @md.fnb + '.' + @md.fn[:manifest] -        else -          'sisu_' + @md.fn[:manifest] +          @md.fnb + @md.lang_code_insert + ft +        else #fix +          'sisu_manifest' + @md.lang_code_insert + ft          end        end        def src          @md.fns        end -      def po +      def po #check          (@fno.empty?) \          ? (@md.fn[:po]) \          : (@fno + '.po') @@ -3705,18 +3718,28 @@ WOK        def rcp          def abc            if @env.output_dir_structure.by_language_code? -            "#{output_path.stub.rcp}/#{@md.opt.lng}/#{ft}" +            "#{output_path.stub.rcp}/#{@md.opt.lng}/#{@ft}"            elsif @env.output_dir_structure.by_filetype? -            "#{output_path.stub.rcp}/#{ft}" +            "#{output_path.stub.rcp}/#{@ft}"            else              "#{output_path.stub.rcp}/#{@md.fnb}"            end          end          def ab            if @env.output_dir_structure.by_language_code? -            "#{output_path.stub.rcp}/#{@md.opt.lng}/#{ft}" +            "#{output_path.stub.rcp}/#{@md.opt.lng}/#{@ft}"            else -            "#{output_path.stub.rcp}/#{ft}" +            "#{output_path.stub.rcp}/#{@ft}" +          end +        end +        self +      end +      def rel_sm +        def ab +          if @env.output_dir_structure.by_language_code? \ +          or @env.output_dir_structure.by_filetype? +            '../' + @ft +          else '.'            end          end          self @@ -3724,6 +3747,21 @@ WOK        self      end      def output_path +      def web_base +        def dir +          @env.path.webserv +        end +        def url +          #"#{@env.url.root}" +        end +        def rel +          '.' +        end +        def rcp +          '.' +        end +        self +      end        def stub          def dir            "#{@md.opt.f_pth[:pth_stub]}" @@ -3768,6 +3806,9 @@ WOK          def rcp            "#{output_path.base.rcp}/pod"          end +        def rel_sm +          #"#{output_path.base.rel}/pod" +        end          self        end        def sisugit @@ -3805,6 +3846,18 @@ WOK          def rcp            set_path(ft).rcp.ab_src          end +        def rel_sm +          if @env.output_dir_structure.by_language_code? +            '' +            #"#{output_path.base.dir}/#{@md.opt.lng}/#{@ft}" +          elsif @env.output_dir_structure.by_filetype? +            '' +            #"#{output_path.base.dir}/#{@ft}" +          else +            '' +            #"#{output_path.base.dir}/#{@md.fnb}" +          end +        end          self        end        def po @@ -3868,6 +3921,9 @@ WOK          def rcp            set_path(ft).rcp.abc          end +        def rel_sm +          set_path(ft).rel_sm.ab +        end          self        end        def html_scroll @@ -3886,6 +3942,9 @@ WOK          def rcp            set_path(ft).rcp.abc          end +        def rel_sm +          set_path(ft).rel_sm.ab +        end          self        end        def html_seg @@ -3904,6 +3963,9 @@ WOK          def rcp            set_path(ft).rcp.abc          end +        def rel_sm +          set_path(ft).rel_sm.ab +        end          self        end        def html_concordance @@ -3926,6 +3988,9 @@ WOK          def rcp            set_path(ft).rcp.abc          end +        def rel_sm +          set_path(ft).rel_sm.ab +        end          self        end        def xhtml @@ -3944,6 +4009,9 @@ WOK          def rcp            set_path(ft).rcp.abc          end +        def rel_sm +          set_path(ft).rel_sm.ab +        end          self        end        def epub @@ -3962,6 +4030,9 @@ WOK          def rcp            set_path(ft).rcp.ab          end +        def rel_sm +          set_path(ft).rel_sm.ab +        end          self        end        def odt @@ -3980,6 +4051,9 @@ WOK          def rcp            set_path(ft).rcp.abc          end +        def rel_sm +          set_path(ft).rel_sm.ab +        end          self        end        def xml @@ -3998,6 +4072,9 @@ WOK          def rcp            set_path(ft).rcp.abc          end +        def rel_sm +          set_path(ft).rel_sm.ab +        end          self        end        def xml_sax @@ -4024,6 +4101,9 @@ WOK          def rcp            set_path(ft).rcp.abc          end +        def rel_sm +          set_path(ft).rel_sm.ab +        end          self        end        def hash_digest @@ -4042,6 +4122,9 @@ WOK          def rcp            set_path(ft).rcp.abc          end +        def rel_sm +          set_path(ft).rel_sm.ab +        end          self        end        def manifest @@ -4078,6 +4161,15 @@ WOK          def rcp            set_path(ft).rcp.ab          end +        def rel_sm +          if @env.output_dir_structure.by_language_code? +            '' +          elsif @env.output_dir_structure.by_filetype? +            '' +          else +            '' +          end +        end          self        end        def manpage @@ -4096,6 +4188,15 @@ WOK          def rcp            set_path(ft).rcp.ab          end +        def rel_sm +          if @env.output_dir_structure.by_language_code? +            '' +          elsif @env.output_dir_structure.by_filetype? +            '' +          else +            '' +          end +        end          self        end        def sitemaps @@ -4131,6 +4232,61 @@ WOK          end          self        end +      #def cgi +      #end +      def css +        @d='_sisu/css' +        def dir +          output_path.base.dir + '/' + @d +        end +        def url +          output_path.base.url + '/' + @d +        end +        def rel +          @d +          #output_path.base.rel + '/' + @d +        end +        def rcp +          output_path.stub.rcp + '/' + @d +        end +        self +      end +      def images +        @d='_sisu/image' +        def dir +          output_path.base.dir + '/' + @d +        end +        def url +          output_path.base.url + '/' + @d +        end +        def rel +          @d +          #output_path.base.rel + '/' + @d +        end +        def rcp +          output_path.stub.rcp + '/' + @d +        end +        self +      end +      def images_external +        @d='_sisu/image_external' +        def dir +          output_path.base.dir + '/' + @d +        end +        def url +          output_path.base.url + '/' + @d +        end +        def rel +          output_path.base.rel + '/' + @d +        end +        def rcp +          output_path.base.rcp + '/' + @d +        end +        self +      end +      #def css +      #  #"#{@env.path.output}/#{@env.path.style}" +      #end        self      end    end | 
