aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2014-10-03 19:20:08 -0400
committerRalph Amissah <ralph@amissah.com>2014-10-03 19:20:08 -0400
commit97864e99d0819efdd3916f11f16cca058438ffc4 (patch)
treeffb922fb54a95cec33f311c73c80acb3e0db351c /lib
parentv5 v6: cleaning, minor (diff)
v5 v6: --act provides info on current --act0 to --act9 settings
* makes it easier to make use of acts 0 to 9
Diffstat (limited to 'lib')
-rw-r--r--lib/sisu/v5/hub_options.rb8
-rw-r--r--lib/sisu/v5/se_processing.rb68
-rw-r--r--lib/sisu/v6/hub_options.rb8
-rw-r--r--lib/sisu/v6/se_processing.rb68
4 files changed, 110 insertions, 42 deletions
diff --git a/lib/sisu/v5/hub_options.rb b/lib/sisu/v5/hub_options.rb
index 0854b9c6..9e35cc36 100644
--- a/lib/sisu/v5/hub_options.rb
+++ b/lib/sisu/v5/hub_options.rb
@@ -511,7 +511,7 @@ module SiSU_Commandline
shortcut=SiSU_Env::InfoProcessingFlag.new
if files ==:true
if not sel_init.empty? \
- and sel_init.inspect =~/"--act[0-9]/
+ and sel_init.inspect =~/"--act[s0-9]?/
sel_init.each do |s|
select_arr <<=case s
when /--act0/ then shortcut.act_0.arr
@@ -524,6 +524,7 @@ module SiSU_Commandline
when /--act7/ then shortcut.act_7.arr
when /--act8/ then shortcut.act_8.arr
when /--act9/ then shortcut.act_9.arr
+ when /--act/ then shortcut.act_info
end
end
end
@@ -688,6 +689,11 @@ module SiSU_Commandline
end
end
else
+ if not sel_init.empty? \
+ and sel_init.inspect =~/"--acts?/
+ shortcut.act_info
+ exit
+ end
if ch =~/c/ then select_arr << '--color-toggle'
ch=ch.gsub(/[c]/,'')
end
diff --git a/lib/sisu/v5/se_processing.rb b/lib/sisu/v5/se_processing.rb
index 88b0b7df..8646b5e0 100644
--- a/lib/sisu/v5/se_processing.rb
+++ b/lib/sisu/v5/se_processing.rb
@@ -472,6 +472,9 @@ module SiSU_Info_Processing_Flag
: false
end
def act_0 #configurable processing flag shortcuts
+ def default
+ '--manifest --digest --qrcode --text --html --epub --concordance --pdf --odf --docbook --xhtml --xml-sax --xml-dom --sqlite --verbose'
+ end
def str
if defined? @rc['flag']['act0'] \
and @rc['flag']['act0'].is_a?(String)
@@ -479,8 +482,7 @@ module SiSU_Info_Processing_Flag
elsif defined? @rc['flag']['default'] \
and @rc['flag']['default'].is_a?(String)
@rc['flag']['default']
- else
- '--manifest --digest --qrcode --text --html --epub --concordance --pdf --odf --docbook --xhtml --xml-sax --xml-dom --sqlite --verbose'
+ else default
end
end
def arr
@@ -489,6 +491,9 @@ module SiSU_Info_Processing_Flag
self
end
def act_1 #configurable processing flag shortcuts
+ def default
+ '--manifest --text --html'
+ end
def str
if defined? @rc['flag']['act1'] \
and @rc['flag']['act1'].is_a?(String)
@@ -496,8 +501,7 @@ module SiSU_Info_Processing_Flag
elsif defined? @rc['flag']['i'] \
and @rc['flag']['i'].is_a?(String)
@rc['flag']['i']
- else
- '--manifest --text --html'
+ else default
end
end
def arr
@@ -506,6 +510,9 @@ module SiSU_Info_Processing_Flag
self
end
def act_2 #configurable processing flag shortcuts
+ def default
+ '--manifest --text --html --epub --pdf'
+ end
def str
if defined? @rc['flag']['act2'] \
and @rc['flag']['act2'].is_a?(String)
@@ -513,8 +520,7 @@ module SiSU_Info_Processing_Flag
elsif defined? @rc['flag']['ii'] \
and @rc['flag']['ii'].is_a?(String)
@rc['flag']['ii']
- else
- '--manifest --text --html --epub --pdf'
+ else default
end
end
def arr
@@ -523,6 +529,9 @@ module SiSU_Info_Processing_Flag
self
end
def act_3 #configurable processing flag shortcuts
+ def default
+ '--manifest --text --html --epub --pdf --concordance --qrcode'
+ end
def str
if defined? @rc['flag']['act3'] \
and @rc['flag']['act3'].is_a?(String)
@@ -530,8 +539,7 @@ module SiSU_Info_Processing_Flag
elsif defined? @rc['flag']['iii'] \
and @rc['flag']['iii'].is_a?(String)
@rc['flag']['iii']
- else
- '--manifest --text --html --epub --pdf --concordance --qrcode'
+ else default
end
end
def arr
@@ -540,6 +548,9 @@ module SiSU_Info_Processing_Flag
self
end
def act_4 #configurable processing flag shortcuts
+ def default
+ '--manifest --text --html --epub --pdf --concordance --qrcode --digest --odf --docbook'
+ end
def str
if defined? @rc['flag']['act4'] \
and @rc['flag']['act4'].is_a?(String)
@@ -547,8 +558,7 @@ module SiSU_Info_Processing_Flag
elsif defined? @rc['flag']['iv'] \
and @rc['flag']['iv'].is_a?(String)
@rc['flag']['iv']
- else
- '--manifest --text --html --epub --pdf --concordance --qrcode --digest --odf --docbook'
+ else default
end
end
def arr
@@ -557,6 +567,9 @@ module SiSU_Info_Processing_Flag
self
end
def act_5 #configurable processing flag shortcuts
+ def default
+ '--manifest --text --html --epub --pdf --concordance --qrcode --digest --odf --docbook --sqlite'
+ end
def str
if defined? @rc['flag']['act5'] \
and @rc['flag']['act5'].is_a?(String)
@@ -564,8 +577,7 @@ module SiSU_Info_Processing_Flag
elsif defined? @rc['flag']['v'] \
and @rc['flag']['v'].is_a?(String)
@rc['flag']['v']
- else
- '--manifest --text --html --epub --pdf --concordance --qrcode --digest --odf --docbook --sqlite'
+ else default
end
end
def arr
@@ -574,12 +586,14 @@ module SiSU_Info_Processing_Flag
self
end
def act_6 #configurable processing flag shortcuts
+ def default
+ '--manifest --text --html --epub --pdf --concordance --qrcode --digest --odf --docbook --sqlite --xhtml --xml-sax --xml-dom'
+ end
def str
if defined? @rc['flag']['act6'] \
and @rc['flag']['act6'].is_a?(String)
@rc['flag']['act6']
- else
- '--manifest --text --html --epub --pdf --concordance --qrcode --digest --odf --docbook --sqlite --xhtml --xml-sax --xml-dom'
+ else default
end
end
def arr
@@ -588,12 +602,14 @@ module SiSU_Info_Processing_Flag
self
end
def act_7 #configurable processing flag shortcuts
+ def default
+ '--manifest --text --html --epub --pdf --concordance --qrcode --digest --odf --docbook --sqlite --xhtml --xml-sax --xml-dom --source --sisupod'
+ end
def str
if defined? @rc['flag']['act7'] \
and @rc['flag']['act7'].is_a?(String)
@rc['flag']['act7']
- else
- '--manifest --text --html --epub --pdf --concordance --qrcode --digest --odf --docbook --sqlite --xhtml --xml-sax --xml-dom --source --sisupod'
+ else default
end
end
def arr
@@ -602,12 +618,14 @@ module SiSU_Info_Processing_Flag
self
end
def act_8 #configurable processing flag shortcuts
+ def default
+ '--manifest --text --html --epub --pdf --concordance --qrcode --digest --odf --docbook --xhtml --xml-sax --xml-dom --pg --update'
+ end
def str
if defined? @rc['flag']['act8'] \
and @rc['flag']['act8'].is_a?(String)
@rc['flag']['act8']
- else
- '--manifest --text --html --epub --pdf --concordance --qrcode --digest --odf --docbook --xhtml --xml-sax --xml-dom --pg --update'
+ else default
end
end
def arr
@@ -616,12 +634,14 @@ module SiSU_Info_Processing_Flag
self
end
def act_9 #configurable processing flag shortcuts
+ def default
+ '--manifest --text --html --epub --pdf --concordance --qrcode --digest --odf --docbook --xhtml --xml-sax --xml-dom --pg --update --source --sisupod'
+ end
def str
if defined? @rc['flag']['act9'] \
and @rc['flag']['act9'].is_a?(String)
@rc['flag']['act9']
- else
- '--manifest --text --html --epub --pdf --concordance --qrcode --digest --odf --docbook --xhtml --xml-sax --xml-dom --pg --update --source --sisupod'
+ else default
end
end
def arr
@@ -629,6 +649,14 @@ module SiSU_Info_Processing_Flag
end
self
end
+ def act_info
+ puts 'current "act" settings:'
+ acts=%w[ act_0 act_1 act_2 act_3 act_4 act_5 act_6 act_7 act_8 act_9 ]
+ acts.each_with_index do |m,i|
+ puts '--act-' + i.to_s + ' == ' \
+ + send(m).str
+ end
+ end
end
end
__END__
diff --git a/lib/sisu/v6/hub_options.rb b/lib/sisu/v6/hub_options.rb
index 7ed7645f..f8085c6c 100644
--- a/lib/sisu/v6/hub_options.rb
+++ b/lib/sisu/v6/hub_options.rb
@@ -511,7 +511,7 @@ module SiSU_Commandline
shortcut=SiSU_Env::InfoProcessingFlag.new
if files ==:true
if not sel_init.empty? \
- and sel_init.inspect =~/"--act[0-9]/
+ and sel_init.inspect =~/"--act[s0-9]?/
sel_init.each do |s|
select_arr <<=case s
when /--act0/ then shortcut.act_0.arr
@@ -524,6 +524,7 @@ module SiSU_Commandline
when /--act7/ then shortcut.act_7.arr
when /--act8/ then shortcut.act_8.arr
when /--act9/ then shortcut.act_9.arr
+ when /--act/ then shortcut.act_info
end
end
end
@@ -688,6 +689,11 @@ module SiSU_Commandline
end
end
else
+ if not sel_init.empty? \
+ and sel_init.inspect =~/"--acts?/
+ shortcut.act_info
+ exit
+ end
if ch =~/c/ then select_arr << '--color-toggle'
ch=ch.gsub(/[c]/,'')
end
diff --git a/lib/sisu/v6/se_processing.rb b/lib/sisu/v6/se_processing.rb
index e437bd0f..2f41bb17 100644
--- a/lib/sisu/v6/se_processing.rb
+++ b/lib/sisu/v6/se_processing.rb
@@ -472,6 +472,9 @@ module SiSU_Info_Processing_Flag
: false
end
def act_0 #configurable processing flag shortcuts
+ def default
+ '--manifest --digest --qrcode --text --html --epub --concordance --pdf --odf --docbook --xhtml --xml-sax --xml-dom --sqlite --verbose'
+ end
def str
if defined? @rc['flag']['act0'] \
and @rc['flag']['act0'].is_a?(String)
@@ -479,8 +482,7 @@ module SiSU_Info_Processing_Flag
elsif defined? @rc['flag']['default'] \
and @rc['flag']['default'].is_a?(String)
@rc['flag']['default']
- else
- '--manifest --digest --qrcode --text --html --epub --concordance --pdf --odf --docbook --xhtml --xml-sax --xml-dom --sqlite --verbose'
+ else default
end
end
def arr
@@ -489,6 +491,9 @@ module SiSU_Info_Processing_Flag
self
end
def act_1 #configurable processing flag shortcuts
+ def default
+ '--manifest --text --html'
+ end
def str
if defined? @rc['flag']['act1'] \
and @rc['flag']['act1'].is_a?(String)
@@ -496,8 +501,7 @@ module SiSU_Info_Processing_Flag
elsif defined? @rc['flag']['i'] \
and @rc['flag']['i'].is_a?(String)
@rc['flag']['i']
- else
- '--manifest --text --html'
+ else default
end
end
def arr
@@ -506,6 +510,9 @@ module SiSU_Info_Processing_Flag
self
end
def act_2 #configurable processing flag shortcuts
+ def default
+ '--manifest --text --html --epub --pdf'
+ end
def str
if defined? @rc['flag']['act2'] \
and @rc['flag']['act2'].is_a?(String)
@@ -513,8 +520,7 @@ module SiSU_Info_Processing_Flag
elsif defined? @rc['flag']['ii'] \
and @rc['flag']['ii'].is_a?(String)
@rc['flag']['ii']
- else
- '--manifest --text --html --epub --pdf'
+ else default
end
end
def arr
@@ -523,6 +529,9 @@ module SiSU_Info_Processing_Flag
self
end
def act_3 #configurable processing flag shortcuts
+ def default
+ '--manifest --text --html --epub --pdf --concordance --qrcode'
+ end
def str
if defined? @rc['flag']['act3'] \
and @rc['flag']['act3'].is_a?(String)
@@ -530,8 +539,7 @@ module SiSU_Info_Processing_Flag
elsif defined? @rc['flag']['iii'] \
and @rc['flag']['iii'].is_a?(String)
@rc['flag']['iii']
- else
- '--manifest --text --html --epub --pdf --concordance --qrcode'
+ else default
end
end
def arr
@@ -540,6 +548,9 @@ module SiSU_Info_Processing_Flag
self
end
def act_4 #configurable processing flag shortcuts
+ def default
+ '--manifest --text --html --epub --pdf --concordance --qrcode --digest --odf --docbook'
+ end
def str
if defined? @rc['flag']['act4'] \
and @rc['flag']['act4'].is_a?(String)
@@ -547,8 +558,7 @@ module SiSU_Info_Processing_Flag
elsif defined? @rc['flag']['iv'] \
and @rc['flag']['iv'].is_a?(String)
@rc['flag']['iv']
- else
- '--manifest --text --html --epub --pdf --concordance --qrcode --digest --odf --docbook'
+ else default
end
end
def arr
@@ -557,6 +567,9 @@ module SiSU_Info_Processing_Flag
self
end
def act_5 #configurable processing flag shortcuts
+ def default
+ '--manifest --text --html --epub --pdf --concordance --qrcode --digest --odf --docbook --sqlite'
+ end
def str
if defined? @rc['flag']['act5'] \
and @rc['flag']['act5'].is_a?(String)
@@ -564,8 +577,7 @@ module SiSU_Info_Processing_Flag
elsif defined? @rc['flag']['v'] \
and @rc['flag']['v'].is_a?(String)
@rc['flag']['v']
- else
- '--manifest --text --html --epub --pdf --concordance --qrcode --digest --odf --docbook --sqlite'
+ else default
end
end
def arr
@@ -574,12 +586,14 @@ module SiSU_Info_Processing_Flag
self
end
def act_6 #configurable processing flag shortcuts
+ def default
+ '--manifest --text --html --epub --pdf --concordance --qrcode --digest --odf --docbook --sqlite --xhtml --xml-sax --xml-dom'
+ end
def str
if defined? @rc['flag']['act6'] \
and @rc['flag']['act6'].is_a?(String)
@rc['flag']['act6']
- else
- '--manifest --text --html --epub --pdf --concordance --qrcode --digest --odf --docbook --sqlite --xhtml --xml-sax --xml-dom'
+ else default
end
end
def arr
@@ -588,12 +602,14 @@ module SiSU_Info_Processing_Flag
self
end
def act_7 #configurable processing flag shortcuts
+ def default
+ '--manifest --text --html --epub --pdf --concordance --qrcode --digest --odf --docbook --sqlite --xhtml --xml-sax --xml-dom --source --sisupod'
+ end
def str
if defined? @rc['flag']['act7'] \
and @rc['flag']['act7'].is_a?(String)
@rc['flag']['act7']
- else
- '--manifest --text --html --epub --pdf --concordance --qrcode --digest --odf --docbook --sqlite --xhtml --xml-sax --xml-dom --source --sisupod'
+ else default
end
end
def arr
@@ -602,12 +618,14 @@ module SiSU_Info_Processing_Flag
self
end
def act_8 #configurable processing flag shortcuts
+ def default
+ '--manifest --text --html --epub --pdf --concordance --qrcode --digest --odf --docbook --xhtml --xml-sax --xml-dom --pg --update'
+ end
def str
if defined? @rc['flag']['act8'] \
and @rc['flag']['act8'].is_a?(String)
@rc['flag']['act8']
- else
- '--manifest --text --html --epub --pdf --concordance --qrcode --digest --odf --docbook --xhtml --xml-sax --xml-dom --pg --update'
+ else default
end
end
def arr
@@ -616,12 +634,14 @@ module SiSU_Info_Processing_Flag
self
end
def act_9 #configurable processing flag shortcuts
+ def default
+ '--manifest --text --html --epub --pdf --concordance --qrcode --digest --odf --docbook --xhtml --xml-sax --xml-dom --pg --update --source --sisupod'
+ end
def str
if defined? @rc['flag']['act9'] \
and @rc['flag']['act9'].is_a?(String)
@rc['flag']['act9']
- else
- '--manifest --text --html --epub --pdf --concordance --qrcode --digest --odf --docbook --xhtml --xml-sax --xml-dom --pg --update --source --sisupod'
+ else default
end
end
def arr
@@ -629,6 +649,14 @@ module SiSU_Info_Processing_Flag
end
self
end
+ def act_info
+ puts 'current "act" settings:'
+ acts=%w[ act_0 act_1 act_2 act_3 act_4 act_5 act_6 act_7 act_8 act_9 ]
+ acts.each_with_index do |m,i|
+ puts '--act-' + i.to_s + ' == ' \
+ + send(m).str
+ end
+ end
end
end
__END__