aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2011-06-26 16:15:27 -0400
committerRalph Amissah <ralph@amissah.com>2011-06-26 22:40:25 -0400
commitb232545a79348473d23bc84df838876edea5ecbb (patch)
treeebf524a57fad9a601a798adb10e32d822c6d91e4 /lib
parentv3: sysenv, fix some output paths (markup source); accommodate manpage (diff)
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)
Diffstat (limited to 'lib')
-rw-r--r--lib/sisu/v3/manifest.rb36
1 files changed, 26 insertions, 10 deletions
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] << %{<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> &nbsp;&nbsp;#{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+/
+ @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> &nbsp;&nbsp;#{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
@@ -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)