diff options
Diffstat (limited to 'lib/sisu/hub_actions.rb')
-rw-r--r-- | lib/sisu/hub_actions.rb | 38 |
1 files changed, 26 insertions, 12 deletions
diff --git a/lib/sisu/hub_actions.rb b/lib/sisu/hub_actions.rb index 02d3c0ad..a946591d 100644 --- a/lib/sisu/hub_actions.rb +++ b/lib/sisu/hub_actions.rb @@ -7,11 +7,11 @@ *** hub, perform selected actions ** Author: Ralph Amissah - <ralph@amissah.com> - <ralph.amissah@gmail.com> + [ralph@amissah.com] + [ralph.amissah@gmail.com] ** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, - 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Ralph Amissah, + 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016 Ralph Amissah, All Rights Reserved. ** License: GPL 3 or later: @@ -31,14 +31,12 @@ more details. You should have received a copy of the GNU General Public License along with - this program. If not, see <http://www.gnu.org/licenses/>. + this program. If not, see [http://www.gnu.org/licenses/]. If you have Internet connection, the latest version of the GPL should be available at these locations: - <http://www.fsf.org/licensing/licenses/gpl.html> - <http://www.gnu.org/licenses/gpl.html> - - <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html> + [http://www.fsf.org/licensing/licenses/gpl.html] + [http://www.gnu.org/licenses/gpl.html] ** SiSU uses: * Standard SiSU markup syntax, @@ -46,12 +44,12 @@ * Standard SiSU object citation numbering and system ** Hompages: - <http://www.jus.uio.no/sisu> - <http://www.sisudoc.org> + [http://www.jus.uio.no/sisu] + [http://www.sisudoc.org] ** Git - <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary> - <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/hub_actions.rb;hb=HEAD> + [http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary] + [http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/hub_actions.rb;hb=HEAD] =end module SiSU_Hub_Actions @@ -384,6 +382,22 @@ module SiSU_Hub_Actions end end end + def json? + if @opt.act[:json][:set]==:on #% --js, -J + if @opt.f_pths.length > 0 + require_relative 'json' # json.rb + SiSU_JSON::Source.new(@opt).read + else + msg='json request requires sisu markup files' + if (@opt.act[:verbose_plus][:set]==:on \ + || @opt.act[:maintenance][:set]==:on) + SiSU_Utils::CodeMarker.new(__LINE__,__FILE__,:yellow). + mark(msg) + else puts msg + end + end + end + end def xhtml? if @opt.act[:xhtml][:set]==:on #% --xhtml, -b if @opt.f_pths.length > 0 |