From b232545a79348473d23bc84df838876edea5ecbb Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Sun, 26 Jun 2011 16:15:27 -0400 Subject: v3: manifest, manifest enable additional output & source (if shared) * manpage (in fututure have config setting with default false/off) * info (texinfo) (in fututure have config setting with default false/off) * hash digests * locate markup source (if shared) * sisupod (if shared) --- lib/sisu/v3/manifest.rb | 36 ++++++++++++++++++++++++++---------- 1 file changed, 26 insertions(+), 10 deletions(-) (limited to 'lib') diff --git a/lib/sisu/v3/manifest.rb b/lib/sisu/v3/manifest.rb index bed74aab..06745c35 100644 --- a/lib/sisu/v3/manifest.rb +++ b/lib/sisu/v3/manifest.rb @@ -143,8 +143,7 @@ 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] << %{

#{id}

#{file}   #{dgst[1]}
#{@brace_url.xml_open}#{url}/#{file}#{@brace_url.xml_close}

#{kb}

- \n} if kb and kb =~/\d+/ + @manifest[:html] << %{

#{id}

#{file}   #{dgst[1]}
#{@brace_url.xml_open}#{url}/#{file}#{@brace_url.xml_close}

#{kb}

\n} if kb and kb =~/\d+/ end def published_manifests? @f=SiSU_Env::SiSU_file.new(@md) #.base_filename @@ -384,11 +383,25 @@ module SiSU_Manifest 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 - rel,url='','' - #pth='' + if FileTest.file?(@f.place_file.manpage.dir)==true + pth=@f.output_path.manpage.dir + rel=@f.output_path.manpage.rel_sm + url=@f.output_path.manpage.url + id,file='Manpage',@f.base_filename.manpage + summarize(id,file,pth,rel,url) + end + if FileTest.file?(@f.place_file.texinfo.dir)==true + pth=@f.output_path.texinfo.dir + rel=@f.output_path.texinfo.rel_sm + url=@f.output_path.texinfo.url + id,file='Texinfo',@f.base_filename.texinfo + summarize(id,file,pth,rel,url) + end + if FileTest.file?(@f.place_file.hash_digest.dir)==true + pth=@f.output_path.hash_digest.dir + rel=@f.output_path.hash_digest.rel_sm + url=@f.output_path.hash_digest.url + id,file="Digest/DCC - Document Content Certificate (#{@dg})",@f.base_filename.hash_digest summarize(id,file,pth,rel,url) end end @@ -407,7 +420,8 @@ module SiSU_Manifest req=@md.fns if FileTest.file?(@f.place_file.src.dir)==true pth=@f.output_path.src.dir - rel=@f.output_path.src.rel_sm + rel=@f.output_path.src.rel + #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) @@ -415,7 +429,8 @@ module SiSU_Manifest else if FileTest.file?(@f.place_file.src.dir)==true pth=@f.output_path.src.dir - rel=@f.output_path.src.rel_sm + rel=@f.output_path.src.rel + #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) @@ -423,7 +438,8 @@ module SiSU_Manifest end if FileTest.file?(@f.place_file.sisupod.dir)==true pth=@f.output_path.sisupod.dir - rel=@f.output_path.sisupod.rel_sm + rel=@f.output_path.sisupod.rel + #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) -- cgit v1.2.3