aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v4/options.rb
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2013-02-03 22:16:52 -0500
committerRalph Amissah <ralph@amissah.com>2013-02-04 00:09:39 -0500
commit9f278652ce86604c11d8c2b51c7ed255e7e1d1f6 (patch)
treef6b5fb00291f1ecca0262192af65308ec9b93f14 /lib/sisu/v4/options.rb
parentv4 (v3): css (html & epub) line spacing reduced, paragraph spacing increased (diff)
v4: html (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)]
Diffstat (limited to 'lib/sisu/v4/options.rb')
-rw-r--r--lib/sisu/v4/options.rb24
1 files changed, 20 insertions, 4 deletions
diff --git a/lib/sisu/v4/options.rb b/lib/sisu/v4/options.rb
index e26fcfc2..fbdfc8f3 100644
--- a/lib/sisu/v4/options.rb
+++ b/lib/sisu/v4/options.rb
@@ -471,6 +471,8 @@ module SiSU_Commandline
when /^--(?:dal?|machine|abstraction|abs)$/; c=c+'m'
when /^--(?:txt|text|plaintext)$/; c=c+'t'
when /^--(?:html)$/; c=c+'h'
+ when /^--(?:html-scroll|html-seg)$/; c=c+'H'
+ mod << m
when /^--(?:epub)$/; c=c+'e'
when /^--(?:od[ft])$/; c=c+'o'
when /^--(?:pdf)$/; c=c+'p'
@@ -757,10 +759,24 @@ module SiSU_Commandline
|| mod.inspect =~/"--dal"/) \
? { bool: true, set: :on }
: { bool: false, set: :na }
- act[:html]=(cmd =~/h/ \
- || mod.inspect =~/"--html"/) \
- ? { bool: true, set: :on }
- : { bool: false, set: :na }
+ act[:html]=if (cmd =~/h/ \
+ || mod.inspect =~/"--html"/)
+ act[:html_scroll]={ bool: true, set: :on }
+ 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
+ { bool: false, set: :na }
+ end
act[:concordance]=(cmd =~/w/ \
|| mod.inspect =~/"--concordance"/) \
? { bool: true, set: :on }