json, an output representation, first pass
[software/sisu] / lib / sisu / urls.rb
index 86eb2e33a801c6b4ae821458b1a2ea8ed1575b5a..b2674fc4fa842d115d0f7f523d61fc0c28949f69 100644 (file)
@@ -335,6 +335,15 @@ module SiSU_Urls
         end
         self
       end
+      def json
+        {
+          cmd: '--js (json)',
+          viewer: @prog.web_browser,
+          f_pth: @md.file.output_path.json.dir + '/' \
+          + @md.file.base_filename.json,
+          fn: @fn[:json],
+        }
+      end
       def pdf
         def landscape
           {
@@ -620,6 +629,10 @@ module SiSU_Urls
               show.report(report_info.xml.scaffold_collapse)
               #show.maintenance(report_info.xml.scaffold_collapse)
             end
+            if @opt.act[:json][:set]==:on
+              show.report(report_info.json)
+              #show.maintenance(report_info.json)
+            end
             if (@opt.act[:pdf][:set]==:on \
             or @opt.act[:pdf_p][:set]==:on \
             or @opt.act[:pdf_l][:set]==:on)