From ee91e6282464321d5f1e8694c048c24abf8d15d7 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Wed, 24 Feb 2016 23:21:06 -0500 Subject: json, an output representation, first pass --- lib/sisu/hub_options.rb | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'lib/sisu/hub_options.rb') 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 \ -- cgit v1.2.3