aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2013-02-06 21:17:46 -0500
committerRalph Amissah <ralph@amissah.com>2013-02-06 21:17:46 -0500
commit5b0d2c1fc909a5a50bd8168428a0ce42364b0b5c (patch)
treec9cbd4f1851f6a9d56e0c72f9ee6e4f4f5d5880c
parentv4 (v3): version & changelog (diff)
v4: html, screen reporting for --html-scroll, correctly identify output file
-rw-r--r--data/doc/sisu/CHANGELOG_v45
-rw-r--r--lib/sisu/v4/html.rb7
-rw-r--r--lib/sisu/v4/options.rb16
3 files changed, 15 insertions, 13 deletions
diff --git a/data/doc/sisu/CHANGELOG_v4 b/data/doc/sisu/CHANGELOG_v4
index a4907803..1b51330a 100644
--- a/data/doc/sisu/CHANGELOG_v4
+++ b/data/doc/sisu/CHANGELOG_v4
@@ -24,6 +24,8 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_4.0.6.orig.tar.xz
sisu_4.0.6.orig.tar.xz
sisu_4.0.6-1.dsc
+* v4: html, screen reporting for --html-scroll, correctly identify output file
+
%% 4.0.5.orig.tar.xz (2013-02-03:04/7)
http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/sisu_4.0.5
http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/debian/sisu_4.0.5-1
@@ -31,7 +33,8 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_4.0.5.orig.tar.xz
sisu_4.0.5.orig.tar.xz
sisu_4.0.5-1.dsc
-* v4: html (urls), scroll & seg optionally discrete, individually callable
+* v4: html (options, hub, urls), scroll & seg optionally discrete, individually
+ callable
* --html (both), --html-scroll, --html-seg
* [possibly of interest where only one form of html of interest for use &/or
to cut generation time (roughly to 63% for --html-scroll only)]
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/ \