diff options
author | Ralph Amissah <ralph@amissah.com> | 2007-10-14 21:29:55 +0100 |
---|---|---|
committer | Ralph Amissah <ralph@amissah.com> | 2007-10-14 21:29:55 +0100 |
commit | 69e8c05210e249e679b259cb843a5e708273e9be (patch) | |
tree | 065b61391a561df11711106e4767d6d0b2a7225e /lib/sisu/v0/manifest.rb | |
parent | remote, (put, get) in single file; embedded content, posted locally and remot... (diff) |
shared markup source output moved to own common src directory
Diffstat (limited to 'lib/sisu/v0/manifest.rb')
-rw-r--r-- | lib/sisu/v0/manifest.rb | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/lib/sisu/v0/manifest.rb b/lib/sisu/v0/manifest.rb index da123216..8a1f0cd3 100644 --- a/lib/sisu/v0/manifest.rb +++ b/lib/sisu/v0/manifest.rb @@ -93,7 +93,9 @@ module SiSU_Manifest @fnb=@md.fnb out=@env.path.output @base_url="#{@env.url.root}/#@fnb" + @base_url_src="#{@env.url.root}/src" @base_path="#{out}/#@fnb" + @base_path_src="#{out}/src" @@dg ||=SiSU_Env::Info_env.new.digest.type @dg=@@dg l=SiSU_Env::Standardise_language.new.file_to_language(@md.fns) @@ -116,15 +118,15 @@ module SiSU_Manifest end def summarize_source(id,file) sys=SiSU_Env::System_call.new - dgst =if @dg =~/^sha(?:2|256)$/; sys.sha256("#{@base_path}/#{file}") - else sys.md5("#{@base_path}/#{file}") + dgst =if @dg =~/^sha(?:2|256)$/; sys.sha256("#{@base_path_src}/#{file}") + else sys.md5("#{@base_path_src}/#{file}") end tell=SiSU_Screen::Ansi.new(@md.cmd,"#{dgst[1]} #{file}") tell.warn if @md.cmd =~/[vVM]/ - size=(File.size("#{@base_path}/#{file}")/1024.00).to_s + size=(File.size("#{@base_path_src}/#{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="#{file}">#{id}</a></p></th><td class="right"><p class="tiny"><a href="#{file}">#{file}</a> #{dgst[1]}<br />#{@url_brace.xml_open}<a href="#@base_url/#{file}">#@base_url/#{file}</a>#{@url_brace.xml_close}</p></td><td class="right"><p class="right">#{kb}</p> + @manifest[:html] << %{<tr><th class="left"><p class="norm"><a href="../src/#{file}">#{id}</a></p></th><td class="right"><p class="tiny"><a href="../src/#{file}">#{file}</a> #{dgst[1]}<br />#{@url_brace.xml_open}<a href="#@base_url_src/#{file}">#@base_url_src/#{file}</a>#{@url_brace.xml_close}</p></td><td class="right"><p class="right">#{kb}</p> </td></tr>\n} if kb and kb =~/\d+/ end def languages(id,file) @@ -233,18 +235,18 @@ module SiSU_Manifest end def source_tests if @md.fns =~/\._sst$/ #% decide whether to extract and include requested/required documents - req=@md.fns.gsub(/(.+)?\._sst$/,'\1.composite.sst') #watch strange - if FileTest.file?("#@base_path/#{req}")==true + req=@md.fns.gsub(/(.+)?\._sst$/,'\1.ssm.sst') #watch strange + if FileTest.file?("#@base_path_src/#{req}")==true id,file='Markup Composite File (SiSU source)',req summarize_source(id,file) end end - if FileTest.file?("#@base_path/#{@md.fns}")==true + if FileTest.file?("#@base_path_src/#{@md.fns}")==true id,file='Markup (SiSU source)',@md.fns summarize_source(id,file) end - if FileTest.file?("#@base_path/sisupod.zip")==true - id,file='SiSU doc (zip)','sisupod.zip' + if FileTest.file?("#@base_path_src/#{@md.fn[:sisupod]}")==true + id,file='SiSU doc (zip)',@md.fn[:sisupod] summarize_source(id,file) end if FileTest.file?("#@base_path/#{@md.fnb}")==true and @md.fnb =~/\.kdi$/ |