aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/hub_options.rb
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2016-02-24 23:21:06 -0500
committerRalph Amissah <ralph@amissah.com>2016-02-24 23:54:58 -0500
commitee91e6282464321d5f1e8694c048c24abf8d15d7 (patch)
treef625748df5ac43de3b19ad96863b098eb1231af6 /lib/sisu/hub_options.rb
parenttxt_orgmode, update (dp add email header field) (diff)
json, an output representation, first pass
Diffstat (limited to 'lib/sisu/hub_options.rb')
-rw-r--r--lib/sisu/hub_options.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/sisu/hub_options.rb b/lib/sisu/hub_options.rb
index 0794dffb..e0832553 100644
--- a/lib/sisu/hub_options.rb
+++ b/lib/sisu/hub_options.rb
@@ -636,6 +636,9 @@ module SiSU_Commandline
if ch =~/j/ then select_arr << '--images'
ch=ch.gsub(/[j]/,'')
end
+ if ch =~/J/ then select_arr << '--json'
+ ch=ch.gsub(/[J]/,'')
+ end
if ch =~/N/ then select_arr << '--digests'
ch=ch.gsub(/[N]/,'')
end
@@ -1022,6 +1025,10 @@ module SiSU_Commandline
=~/"--images"/) \
? { bool: true, set: :on }
: { bool: false, set: :na }
+ act[:json]=(select_arr.inspect \
+ =~/"--json"/) \
+ ? { bool: true, set: :on }
+ : { bool: false, set: :na }
if select_arr.inspect \
=~/"--pdf"/
if select_arr.inspect \
@@ -1488,6 +1495,7 @@ module SiSU_Commandline
|| act[:html][:set]==:on \
|| act[:html_seg][:set]==:on \
|| act[:html_scroll][:set]==:on \
+ || act[:json][:set]==:on \
|| act[:texinfo][:set]==:on \
|| act[:manpage][:set]==:on \
|| act[:hash_digests][:set]==:on \
@@ -1538,6 +1546,7 @@ module SiSU_Commandline
|| act[:html][:set]==:on \
|| act[:html_seg][:set]==:on \
|| act[:html_scroll][:set]==:on \
+ || act[:json][:set]==:on \
|| act[:texinfo][:set]==:on \
|| act[:manpage][:set]==:on \
|| act[:hash_digests][:set]==:on \