aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v5/options.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sisu/v5/options.rb')
-rw-r--r--lib/sisu/v5/options.rb49
1 files changed, 38 insertions, 11 deletions
diff --git a/lib/sisu/v5/options.rb b/lib/sisu/v5/options.rb
index 7203f8b2..f410e61f 100644
--- a/lib/sisu/v5/options.rb
+++ b/lib/sisu/v5/options.rb
@@ -496,7 +496,7 @@ module SiSU_Commandline
when /^--(?:color-toggle)$/; c=c+'c'
when /^--(?:color-off)$/; c=c+'k'
when /^--(?:conf|config|configure|init|initialize|init-site)$/; c=c+'CC'
- when /^--(?:dal?|machine|abstraction|abs)$/; c=c+'m'
+ when /^--(?:ao|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'
@@ -552,12 +552,12 @@ module SiSU_Commandline
if cmd !~/[mn]/
extra+=if cmd =~/[abegHhIiLNOoPpQTtwXxyz]/ \
and cmd !~/[mn]/
- 'm' #% add dal
+ 'm' #% add ao
elsif ((cmd =~/[Dd]/ \
or (mod.inspect =~/--(?:(?:sq)?lite|pg(?:sql)?)/)) \
and mod.inspect !~/(?:remove|(?:(?:re)?create(?:all)?|dropall|drop)$)/) \
and cmd !~/[mn]/
- 'm' #% add dal
+ 'm' #% add ao
else ''
end
end
@@ -861,6 +861,13 @@ module SiSU_Commandline
|| mod.inspect =~/"--xml-dom"/) \
? { bool: true, set: :on }
: { bool: false, set: :na }
+ act[:xml_docbook_book]=mod.inspect =~/"--docbook"|"--docbook-book"|"--xml-docbook"|"--xml-docbook_book"/ \
+ ? { bool: true, set: :on }
+ : { bool: false, set: :na }
+ act[:xml_fictionbook]=(cmd =~/f/ \
+ || mod.inspect =~/"--fictionbook"|"--xml-fictionbook"/) \
+ ? { bool: true, set: :on }
+ : { bool: false, set: :na }
act[:xml_scaffold_structure_sisu]=mod.inspect =~/"--xml-scaffold"|"--xml-scaffold-sisu"/ \
? { bool: true, set: :on }
: { bool: false, set: :na }
@@ -875,6 +882,18 @@ module SiSU_Commandline
|| mod.inspect =~/"--txt"/) \
? { bool: true, set: :on }
: { bool: false, set: :na }
+ act[:txt_textile]=(mod.inspect =~/"--textile"/) \
+ ? { bool: true, set: :on }
+ : { bool: false, set: :na }
+ act[:txt_asciidoc]=(mod.inspect =~/"--asciidoc"/) \
+ ? { bool: true, set: :on }
+ : { bool: false, set: :na }
+ act[:txt_markdown]=(mod.inspect =~/"--markdown"/) \
+ ? { bool: true, set: :on }
+ : { bool: false, set: :na }
+ act[:txt_rst]=(mod.inspect =~/"--rst"|"--rest"|"--restructuredtext"/) \
+ ? { bool: true, set: :on }
+ : { bool: false, set: :na }
act[:manpage]=(cmd =~/i/ \
|| mod.inspect =~/"--manpage"|"--man"/) \
? { bool: true, set: :on }
@@ -883,10 +902,6 @@ module SiSU_Commandline
|| mod.inspect =~/"--texinfo"/) \
? { bool: true, set: :on }
: { bool: false, set: :na }
- act[:fictionbook]=(cmd =~/f/ \
- || mod.inspect =~/"--fictionbook"/) \
- ? { bool: true, set: :on }
- : { bool: false, set: :na }
act[:psql]=(cmd =~/D/ \
|| mod.inspect =~/"--pg"|"--pgsql"/) \
? { bool: true, set: :on }
@@ -964,10 +979,14 @@ module SiSU_Commandline
act[:help]=(mod.inspect =~/"--help/) \
? { bool: true, set: :on }
: { bool: false, set: :na }
- act[:dal]=if (cmd =~/m/ \
- || mod.inspect =~/"--dal"/)
+ act[:ao]=if (cmd =~/m/ \
+ || mod.inspect =~/"--ao"|"--dal"/)
{ bool: true, set: :on }
elsif (act[:txt][:set]==:on \
+ || act[:txt_textile][:set]==:on \
+ || act[:txt_asciidoc][:set]==:on \
+ || act[:txt_markdown][:set]==:on \
+ || act[:txt_rst][:set]==:on \
|| act[:xhtml][:set]==:on \
|| act[:epub][:set]==:on \
|| act[:html][:set]==:on \
@@ -986,20 +1005,22 @@ module SiSU_Commandline
|| act[:concordance][:set]==:on \
|| act[:xml_dom][:set]==:on \
|| act[:xml_sax][:set]==:on \
+ || act[:xml_docbook_book][:set]==:on \
+ || act[:xml_fictionbook][:set]==:on \
|| act[:xml_scaffold_structure_sisu][:set]==:on \
|| act[:xml_scaffold_structure_collapse][:set]==:on )
{ bool: true, set: :on }
#if cmd !~/[mn]/
# extra+=if cmd =~/[abegHhIiLNOoPpQTtwXxyz]/ \
# and cmd !~/[mn]/
- # 'm' #% add dal
+ # 'm' #% add ao
#elsif (act[:txt][:set]==:on \
# { bool: true, set: :on }
# elsif ((cmd =~/[Dd]/ \
# or (mod.inspect =~/--(?:(?:sq)?lite|pg(?:sql)?)/)) \
# and mod.inspect !~/(?:remove|(?:(?:re)?create(?:all)?|dropall|drop)$)/) \
# and cmd !~/[mn]/
- # 'm' #% add dal
+ # 'm' #% add ao
else
{ bool: false, set: :na }
end
@@ -1012,6 +1033,10 @@ module SiSU_Commandline
|| mod.inspect =~/"--manifest"/)
{ bool: true, set: :on }
elsif (act[:txt][:set]==:on \
+ || act[:txt_textile][:set]==:on \
+ || act[:txt_asciidoc][:set]==:on \
+ || act[:txt_markdown][:set]==:on \
+ || act[:txt_rst][:set]==:on \
|| act[:xhtml][:set]==:on \
|| act[:epub][:set]==:on \
|| act[:html][:set]==:on \
@@ -1030,6 +1055,8 @@ module SiSU_Commandline
|| act[:concordance][:set]==:on \
|| act[:xml_dom][:set]==:on \
|| act[:xml_sax][:set]==:on \
+ || act[:xml_docbook_book][:set]==:on \
+ || act[:xml_fictionbook][:set]==:on \
|| act[:xml_scaffold_structure_sisu][:set]==:on \
|| act[:xml_scaffold_structure_collapse][:set]==:on )
{ bool: true, set: :on }