From 5b0d2c1fc909a5a50bd8168428a0ce42364b0b5c Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Wed, 6 Feb 2013 21:17:46 -0500 Subject: v4: html, screen reporting for --html-scroll, correctly identify output file --- lib/sisu/v4/html.rb | 7 +++++-- lib/sisu/v4/options.rb | 16 ++++++---------- 2 files changed, 11 insertions(+), 12 deletions(-) (limited to 'lib') diff --git a/lib/sisu/v4/html.rb b/lib/sisu/v4/html.rb index 9e6ec0fa..530b5faf 100644 --- a/lib/sisu/v4/html.rb +++ b/lib/sisu/v4/html.rb @@ -89,14 +89,17 @@ module SiSU_HTML @fnb=@md.fnb @env=@particulars.env loc=@env.url.output_tell + primary_output_file=(@opt.act[:html_seg][:set]==:on) \ + ? (@md.file.output_path.html_seg.dir + '/' + @md.file.base_filename.html_segtoc) + : (@md.file.output_path.html_scroll.dir + '/' + @md.file.base_filename.html_scroll) unless @opt.cmd =~/q/ tool=(@opt.cmd =~/[MVvz]/) \ - ? ("#{@env.program.web_browser} file://#{@md.file.output_path.html_seg.dir}/#{@md.file.base_filename.html_segtoc}") + ? ("#{@env.program.web_browser} file://#{primary_output_file}") : ("[#{@opt.f_pth[:lng_is]}] #{@opt.fno}") @opt.cmd=~/[MVvz]/ \ ? SiSU_Screen::Ansi.new(@opt.cmd,'HTML',tool).green_hi_blue : SiSU_Screen::Ansi.new(@opt.cmd,'HTML',tool).green_title_hi - SiSU_Screen::Ansi.new(@opt.cmd,@opt.fns,"file://#{@md.file.output_path.html_seg.dir}/#{@md.file.base_filename.html_segtoc}").flow if @opt.cmd =~/[MV]/ + SiSU_Screen::Ansi.new(@opt.cmd,@opt.fns,"file://#{primary_output_file}").flow if @opt.cmd =~/[MV]/ end data=nil tuned_file_array=SiSU_HTML::Source::HTML_Environment.new(@particulars).tuned_file_instructions diff --git a/lib/sisu/v4/options.rb b/lib/sisu/v4/options.rb index fbdfc8f3..6aac2b1a 100644 --- a/lib/sisu/v4/options.rb +++ b/lib/sisu/v4/options.rb @@ -765,16 +765,12 @@ module SiSU_Commandline act[:html_seg]={ bool: true, set: :on } { bool: true, set: :on } else - act[:html_scroll]=if mod.inspect =~/"--html-scroll"/ - { bool: true, set: :on } - else - { bool: false, set: :na } - end - act[:html_seg]=if mod.inspect =~/"--html-seg"/ - { bool: true, set: :on } - else - { bool: false, set: :na } - end + act[:html_scroll]=(mod.inspect =~/"--html-scroll"/) \ + ? { bool: true, set: :on } + : { bool: false, set: :na } + act[:html_seg]=(mod.inspect =~/"--html-seg"/) \ + ? { bool: true, set: :on } + : { bool: false, set: :na } { bool: false, set: :na } end act[:concordance]=(cmd =~/w/ \ -- cgit v1.2.3