From b1b2fe8cc3120d2a53e4c211748107ced1b1b40b Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Sun, 15 May 2011 23:10:49 -0400 Subject: v3: sysenv, output_path & place_file, modified, (affects many libraries) * paths for dir, url, relative and rcp that vary with output dir structure * cope with alterative dir structures * manifest url paths, fix * dal_expand_insertions, fix * rsync, review * scp disabled --- lib/sisu/v3/dal_expand_insertions.rb | 59 +++++++++++++----------------------- 1 file changed, 21 insertions(+), 38 deletions(-) (limited to 'lib/sisu/v3/dal_expand_insertions.rb') diff --git a/lib/sisu/v3/dal_expand_insertions.rb b/lib/sisu/v3/dal_expand_insertions.rb index 0f925bc0..e6b586aa 100644 --- a/lib/sisu/v3/dal_expand_insertions.rb +++ b/lib/sisu/v3/dal_expand_insertions.rb @@ -131,58 +131,41 @@ module SiSU_insertions output_filetypes=output_filetypes_in_cmd(cmd,source) output_filetypes[:gen].each do |o_f| describe = case o_f - when /sisu_manifest.html/; '~^ document manifest' - when /toc.html/; ' html, segmented text' - when /doc.html/; ' html, scroll, document in one' - when /\.epub/; ' epub' - when /landscape.pdf/; ' pdf, landscape' - when /portrait.pdf/; ' pdf, portrait' - when /opendocument.odt/; ' odf:odt, open document text' - when /scroll.xhtml/; ' xhtml scroll' - when /sax.xml/; ' xml, sax' - when /dom.xml/; ' xml, dom' - when /plain.txt/; ' plain text utf-8' - #when /manpage.1/; ' man, 1' - when /wiki.txt/; ' wiki text' - when /concordance.html/; ' concordance' - when /digest.txt/; ' dcc, document content certificate (digests)' + when /sisu_manifest.html/; "~^ { document manifest }#{@md.file.output_path.manifest.url}/#{@md.file.base_filename.manifest}" + when /toc.html/; " { html, segmented text }#{@md.file.output_path.html_seg.url}/#{@md.file.base_filename.html_segtoc}" + when /doc.html/; " { html, scroll, document in one }#{@md.file.output_path.html_scroll.url}/#{@md.file.base_filename.html_scroll}" + when /\.epub/; " { epub }#{@md.file.output_path.epub.url}/#{@md.file.base_filename.epub}" + when /landscape.pdf/; " { pdf, landscape }#{@md.file.output_path.pdf.url}/#{@md.file.base_filename.pdf_l_a4}" #chose a default pdf + when /portrait.pdf/; " { pdf, portrait }#{@md.file.output_path.pdf.url}/#{@md.file.base_filename.pdf_p_a4}" #chose a default pdf + when /opendocument.odt/; " { odf:odt, open document text }#{@md.file.output_path.odt.url}/#{@md.file.base_filename.odt}" + when /scroll.xhtml/; " { xhtml scroll }#{@md.file.output_path.xhtml.url}/#{@md.file.base_filename.xhtml}" + when /sax.xml/; " { xml, sax }#{@md.file.output_path.xml_sax.url}/#{@md.file.base_filename.xml_sax}" + when /dom.xml/; " { xml, dom }#{@md.file.output_path.xml_dom.url}/#{@md.file.base_filename.xml_dom}" + when /plain.txt/; " { plain text utf-8 }#{@md.file.output_path.txt.url}/#{@md.file.base_filename.txt}" + #when /manpage.1/; " man, 1" + when /concordance.html/; " { concordance }#{@md.file.output_path.html_concordance.url}/#{@md.file.base_filename.html_concordance}" + when /digest.txt/; " { dcc, document content certificate (digests) }#{@md.file.output_path.hash_digest.url}/#{@md.file.base_filename.hash_digest}" else nil end if describe tuned_file_tmp << if @u.remote #to double space <:br> at beginning of entry - if describe =~/epub/ - "#{Mx[:nbsp]*4} { #{describe} }#{@u.remote}/epub/#{url_dir}#{o_f} " - elsif describe =~/^~\^ / - "#{Mx[:nbsp]*4} {#{describe} }#{@u.remote}/#{url_dir}/#{o_f} " - else "#{Mx[:nbsp]*4} { #{describe} }#{@u.remote}/#{url_dir}/#{o_f} " - end - else - if describe =~/epub/ - "#{Mx[:nbsp]*4} { #{describe} }../epub/#{url_dir}#{o_f} " - elsif describe =~/^~\^ / - "#{Mx[:nbsp]*4} {#{describe} }../#{url_dir}/#{o_f} " - else "#{Mx[:nbsp]*4} { #{describe} }../#{url_dir}/#{o_f} " - end + "#{Mx[:nbsp]*4} #{describe} " + else # remove ... + "[provide document placement host location]" end end end output_filetypes[:src].each do |o_f| describe=case o_f - when /#{source}\.zip/; ' markup source (zipped) pod' - when /#{source}/; ' markup source text' + when /#{source}\.zip/; " { markup source (zipped) pod }#{@md.file.output_path.sisupod.url}/#{@md.file.base_filename.sisupod}" + when /#{source}/; " { markup source text }#{@md.file.output_path.src.url}/#{@md.file.base_filename.src}" else nil end if describe tuned_file_tmp << if @u.remote - x=if describe =~/zip/ - "#{Mx[:nbsp]*4} {#{describe} }#{@u.src_pod}/#{o_f} " - else "#{Mx[:nbsp]*4} {#{describe} }#{@u.src_txt}/#{o_f} " - end + "#{Mx[:nbsp]*4} #{describe} " else - x=if describe =~/zip/ - "#{Mx[:nbsp]*4} { #{describe} }../pod/#{o_f} " - else "#{Mx[:nbsp]*4} { #{describe} }../zip/#{o_f} " - end + "[provide document placement host location]" end end end -- cgit v1.2.3