aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v3dv/html.rb
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2012-02-14 21:44:59 -0500
committerRalph Amissah <ralph@amissah.com>2012-02-14 21:44:59 -0500
commitdc9c326e4a90ba9019cdcde75176eac7990a269f (patch)
treea5f38e98c512456192fbe06d1bf62d19b3fe567a /lib/sisu/v3dv/html.rb
parentdebian/changelog (3.1.13-1) (diff)
parentv3dv: control hooks (diff)
Merge tag 'sisu_3.1.14' into debian/sid
Diffstat (limited to 'lib/sisu/v3dv/html.rb')
-rw-r--r--lib/sisu/v3dv/html.rb27
1 files changed, 13 insertions, 14 deletions
diff --git a/lib/sisu/v3dv/html.rb b/lib/sisu/v3dv/html.rb
index ec7b0573..75d89382 100644
--- a/lib/sisu/v3dv/html.rb
+++ b/lib/sisu/v3dv/html.rb
@@ -138,14 +138,10 @@ module SiSU_HTML
def link_images
@symlnk.images
end
- def directories
- title=File.basename(@md.fns,'.rb')
- end
def tuned_file_instructions
@tell=SiSU_Screen::Ansi.new(@md.opt.cmd)
@md.opt.cmd=@md.opt.cmd.gsub(/H/,'h')
- @md.file_type='html' if @md.opt.cmd =~/[hon]/
- directories
+ @md.file_type='html' if @md.opt.cmd =~/[hw]/
newfilename=%{#{@md.file.output_path.html_scroll.dir}/#{@md.file.base_filename.html_segtoc}} if @md.file_type =~/html/
dal_array=@particulars.dal_array # dal file drawn here
@tuned_file_array=SiSU_HTML_Tune::Tune.new(dal_array,@md).songsheet
@@ -611,7 +607,8 @@ WOK
class Output
def initialize(data='',md='')
@data,@md=data,md
- @file=SiSU_Env::FileOp.new(@md)
+ @file=SiSU_Env::FileOp.new(md)
+ @o_str ||=SiSU_Env::OutputStructure.new(md).output_dir_structure
end
def scroll
begin
@@ -646,15 +643,17 @@ WOK
rescue; SiSU_Errors::InfoError.new($!,$@,@md.opt.cmd,@md.fns).error
ensure
@filename_html_segtoc.close
- unless FileTest.file?("#{@file.output_path.html_seg.dir}/#{@md.file.base_filename.html_seg_index}")
- pwd_set=Dir.pwd
- idx_lnk=@file.base_filename.html_segtoc
- mlnk=@file.base_filename.html_seg_index
- Dir.chdir(@file.output_path.html_seg.dir)
- FileUtils::rm_f(mlnk)
- FileUtils::ln_s(idx_lnk, mlnk)
- Dir.chdir(pwd_set)
+ pwd_set=Dir.pwd
+ idx_lnk=if @o_str.dump_or_redirect?
+ @file.base_filename.manifest
+ else
+ @file.base_filename.html_segtoc
end
+ mlnk=@file.base_filename.html_seg_index
+ Dir.chdir(@file.output_path.html_seg.dir)
+ FileUtils::rm_f(mlnk)
+ FileUtils::ln_s(idx_lnk,mlnk)
+ Dir.chdir(pwd_set)
end
end
end