aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v0/manifest.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sisu/v0/manifest.rb')
-rw-r--r--lib/sisu/v0/manifest.rb22
1 files changed, 12 insertions, 10 deletions
diff --git a/lib/sisu/v0/manifest.rb b/lib/sisu/v0/manifest.rb
index da123216..0776f4d1 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> &nbsp;&nbsp;#{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> &nbsp;&nbsp;#{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)
@@ -232,19 +234,19 @@ module SiSU_Manifest
end
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
+ if @md.fns =~/\.ssm\.sst$/ #% decide whether to extract and include requested/required documents
+ req=@md.fns
+ 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$/