aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v0/dal.rb
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2007-10-19 20:28:48 +0100
committerRalph Amissah <ralph@amissah.com>2007-10-19 20:28:48 +0100
commit8c67d466ead2096d713515c88fcee17c473ecde5 (patch)
tree5caa22e8124a0ba158e6a31c36c20449364edc77 /lib/sisu/v0/dal.rb
parentmostly adjustment to image paths (for local and remote operations) (diff)
mostly paths for shared markup source (txt and pod), also...
also current Debian/Sid ruby1.9 upgrade removes a bug, so a related test/warning in options.rb removed
Diffstat (limited to 'lib/sisu/v0/dal.rb')
-rw-r--r--lib/sisu/v0/dal.rb16
1 files changed, 9 insertions, 7 deletions
diff --git a/lib/sisu/v0/dal.rb b/lib/sisu/v0/dal.rb
index 0b445832..47d3750d 100644
--- a/lib/sisu/v0/dal.rb
+++ b/lib/sisu/v0/dal.rb
@@ -364,15 +364,14 @@ module SiSU_DAL
if para !~/^%+\s/ and
para =~/\{(?:~\^\s+)?(.+?)\s\[(?:\d(?:[sS]*))\]\}(?:\.\.\/\S+?\/|\S+?\.ss[tm]\b)/
txt,cmd,source,url_dir,note,manifest=nil,nil,nil,nil,nil,nil
- url_and_stub=SiSU_Env::Info_env.new.url
- if defined? url_and_stub.remote
- @output_url="#{url_and_stub.remote}"
+ @u=SiSU_Env::Info_env.new.url
+ if defined? @u.remote
if para =~/(.+?)\{(.+?)\s\[(\d[sS]*)\]\}((\S+?)\.ss[tm]\b)(.*)/m
pre,txt,cmd,source,url_dir,note="#{$1.strip} ",$2,$3,$4,$5,$6
elsif para =~/\{(.+?)\s\[(\d[sS]*)\]\}((\S+?)\.ss[tm]\b)(.*)/
pre,txt,cmd,source,url_dir,note='',$1,$2,$3,$4,$5
end
- manifest="#{pre}{#{txt} }#@output_url/#{url_dir}/toc.html#{note}\n\n"
+ manifest="#{pre}{#{txt} }#{@u.remote}/#{url_dir}/toc.html#{note}\n\n"
else
puts "error, does currently support relative paths (reltive paths were removed, as had problems for citation, and was not suited to all output types should possibly reconsider) #{__FILE__} #{__LINE__}"
if para =~/\{(?:~\^\s+)?(.+?)\s\[(\d[sS]*)\]\}\.\.\/(\S+?)\/(\s+~\{.+?\}~)?/
@@ -402,20 +401,23 @@ module SiSU_DAL
end
if describe
tuned_file_tmp << if @output_url #to double space <:br> at beginning of entry
- "&nbsp;&nbsp;&nbsp;&nbsp; {#{describe} }#@output_url/#{url_dir}/#{o_f}" if describe
+ "&nbsp;&nbsp;&nbsp;&nbsp; {#{describe} }#{@u.remote}/#{url_dir}/#{o_f}"
else "&nbsp;&nbsp;&nbsp;&nbsp; { #{describe} }../#{url_dir}/#{o_f}"
end
end
end
output_filetypes[:src].each do |o_f|
- describe = case o_f
+ describe=case o_f
when /#{source}\.zip/; ' markup source (zipped) pod'
when /#{source}/; ' markup source text'
else nil
end
if describe
tuned_file_tmp << if @output_url
- "&nbsp;&nbsp;&nbsp;&nbsp; {#{describe} }#@output_url/src/#{o_f}" if describe
+ x=if describe =~/\.zip/
+ "&nbsp;&nbsp;&nbsp;&nbsp; {#{describe} }#{@u.src_pod}/#{o_f}"
+ else "&nbsp;&nbsp;&nbsp;&nbsp; {#{describe} }#{@u.src_txt}/#{o_f}"
+ end
else "&nbsp;&nbsp;&nbsp;&nbsp; { #{describe} }../#{url_dir}/#{o_f}"
end
end