From 90051a7ea55acb043434b1c2483b878d602246ba Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Fri, 2 Apr 2021 19:37:00 -0400 Subject: org mode (ruby code within) --- lib/sisu/hub_actions.rb | 114 ++++++++++++++++++++++++------------------------ 1 file changed, 56 insertions(+), 58 deletions(-) (limited to 'lib/sisu/hub_actions.rb') diff --git a/lib/sisu/hub_actions.rb b/lib/sisu/hub_actions.rb index a946591d..ac692bc7 100644 --- a/lib/sisu/hub_actions.rb +++ b/lib/sisu/hub_actions.rb @@ -1,57 +1,55 @@ # encoding: utf-8 -=begin - -* Name: SiSU - -** Description: documents, structuring, processing, publishing, search -*** hub, perform selected actions - -** Author: Ralph Amissah - [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, 2016 Ralph Amissah, - All Rights Reserved. - -** License: GPL 3 or later: - - SiSU, a framework for document structuring, publishing and search - - Copyright (C) Ralph Amissah - - This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by the Free - Software Foundation, either version 3 of the License, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for - 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/]. - - 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] - -** SiSU uses: - * Standard SiSU markup syntax, - * Standard SiSU meta-markup syntax, and the - * Standard SiSU object citation numbering and system - -** Hompages: - [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] - -=end +# - Name: SiSU +# +# - Description: documents, structuring, processing, publishing, search +# hub +# +# - Author: Ralph Amissah +# +# +# - Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, +# 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2019, +# 2020, 2021, Ralph Amissah, +# All Rights Reserved. +# +# - License: GPL 3 or later: +# +# SiSU, a framework for document structuring, publishing and search +# +# Copyright (C) Ralph Amissah +# +# This program is free software: you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by the Free +# Software Foundation, either version 3 of the License, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +# more details. +# +# You should have received a copy of the GNU General Public License along with +# this program. If not, see . +# +# If you have Internet connection, the latest version of the GPL should be +# available at these locations: +# +# +# +# +# +# - SiSU uses: +# - Standard SiSU markup syntax, +# - Standard SiSU meta-markup syntax, and the +# - Standard SiSU object citation numbering and system +# +# - Homepages: +# +# +# - Git +# +# +# module SiSU_Hub_Actions class HubActions require_relative 'utils_composite' # utils_composite.rb @@ -1104,15 +1102,15 @@ module SiSU_Hub_Actions end def webrick # -W prt=SiSU_Env::InfoEnv.new(@fns).port.webrick_port - puts %{#{@cX.blue}<<#{@cX.off}#{@cX.green}Start Webrick web server on port: #{prt}#{@cX.off}#{@cX.blue}>> #{@cX.off*2} } + puts %{#{@cX.blue}[#{@cX.off}#{@cX.green}Start Webrick web server on port: #{prt}#{@cX.off}#{@cX.blue}] #{@cX.off*2} } require_relative 'webrick' SiSU_Webserv::WebrickStart.new end def not_found - puts "\n#{@cX.fuchsia}FILE NOT FOUND:#{@cX.off} << #{@opt.fns} >> - requested #{@opt.selections.str} processing skipped\n" + puts "\n#{@cX.fuchsia}FILE NOT FOUND:#{@cX.off} [ #{@opt.fns} ] - requested #{@opt.selections.str} processing skipped\n" end def convert_name_message(fns,type,i,o,rune) - %{\nIn filename: "#{@cX.fuchsia}#{fns}#{@cX.off}" << #{type} >> #{@cX.fuchsia}is apre 0.36 markup filename.#{@cX.off} #{@cX.brown}Please rename your file.#{@cX.off}\n\tAs of sisu-0.37, SiSU markup files with #{@cX.brown}the extensions #{i} should be re-named #{o}#{@cX.off}\n\tif you have the program called 'rename' installed, the following rune should do the trick:\n\t\t#{rune}\n\talternatively try:\n\t\tsisu --convert --36to37 #{fns}\n\trequested #{@opt.selections.str} processing skipped\n} + %{\nIn filename: "#{@cX.fuchsia}#{fns}#{@cX.off}" [ #{type} ] #{@cX.fuchsia}is apre 0.36 markup filename.#{@cX.off} #{@cX.brown}Please rename your file.#{@cX.off}\n\tAs of sisu-0.37, SiSU markup files with #{@cX.brown}the extensions #{i} should be re-named #{o}#{@cX.off}\n\tif you have the program called 'rename' installed, the following rune should do the trick:\n\t\t#{rune}\n\talternatively try:\n\t\tsisu --convert --36to37 #{fns}\n\trequested #{@opt.selections.str} processing skipped\n} end def not_recognised case @opt.fns @@ -1126,9 +1124,9 @@ module SiSU_Hub_Actions puts convert_name_message(@opt.fns,type,'.r1 .r2 and .r3','.sst',rune) puts %{\n\tNote also that you will need to change the names of the files called/required\n\twithin the document text to build the composite document\n\t\t.s1 .s2 .s3 should be .sst \n\t\t.si should be .ssi\n\trequested #{@opt.selections.str} processing skipped\n} when /(\.ssi)$/ - puts "\n#{@cX.fuchsia}component filetype:#{@cX.off} << #{@opt.fns} >> - is not a processed filetype, (it may be used as a component of a .ssm markup file)\n\trequested #{@opt.selections.str} processing skipped\n" + puts "\n#{@cX.fuchsia}component filetype:#{@cX.off} [ #{@opt.fns} ] - is not a processed filetype, (it may be used as a component of a .ssm markup file)\n\trequested #{@opt.selections.str} processing skipped\n" else - puts "\n#{@cX.fuchsia}FILETYPE NOT RECOGNISED:#{@cX.off} << #{@opt.fns} >> - is not a recognized filetype,\n\trequested #{@opt.selections.str} processing skipped\n" + puts "\n#{@cX.fuchsia}FILETYPE NOT RECOGNISED:#{@cX.off} [ #{@opt.fns} ] - is not a recognized filetype,\n\trequested #{@opt.selections.str} processing skipped\n" end end end -- cgit v1.2.3