diff options
author | Ralph Amissah <ralph@amissah.com> | 2007-09-26 13:12:21 +0100 |
---|---|---|
committer | Ralph Amissah <ralph@amissah.com> | 2007-09-26 13:12:21 +0100 |
commit | a36b83dad3b828761ee565fbb9ff53a5abc6e4b6 (patch) | |
tree | f67d113f40bff70f0616c7a03c8bebd126419a5e | |
parent | sysenv, sisurc.yml allow use of relative output paths, expand to absolute (diff) |
help, (hub), minor reorganisation and a change in response for typing 'sisu' without options
-rw-r--r-- | CHANGELOG | 3 | ||||
-rw-r--r-- | lib/sisu/v0/help.rb | 16 | ||||
-rw-r--r-- | lib/sisu/v0/hub.rb | 17 | ||||
-rw-r--r-- | lib/sisu/v0/sysenv.rb | 3 |
4 files changed, 27 insertions, 12 deletions
@@ -29,6 +29,9 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_0.60.0.orig.tar.gz * sysenv, sisurc.yml allow use of relative output paths, expand to absolute + * help, (hub), minor reorganisation and a change in response for typing + 'sisu' without options + %% sisu_0.59.1.orig.tar.gz (2007-09-25:39/2) http://www.jus.uio.no/sisu/pkg/src/sisu_0.59.1.orig.tar.gz cf512ec871aeb7cdabc0b3b35b7e6d05 10952059 sisu_0.59.1.orig.tar.gz diff --git a/lib/sisu/v0/help.rb b/lib/sisu/v0/help.rb index 4805f6ad..0cd100f4 100644 --- a/lib/sisu/v0/help.rb +++ b/lib/sisu/v0/help.rb @@ -160,6 +160,8 @@ module SiSU_Help This is free software, and you are welcome to redistribute it under the conditions of the GPL3 or later. For more license detail type/enter: "sisu --help license" +for help type 'sisu --help', 'sisu --help [help request]', 'man sisu', (or see the system or online documentation) + typing "sisu" on its own or "sisu --help", should give you this sisu help summary and the sisu (interactive help mode) help prompt, from which help on each keyword can be obtained. alternatively typing #{@cX.orange}sisu --help#{@cX.off} #{@cX.green}[keyword]#{@cX.off} at the command prompt will provide the sisu help page requested and return to the command prompt (if nothing is found it will print this page and return to the command prompt) @@ -184,6 +186,8 @@ alternatively typing #{@cX.orange}sisu --help#{@cX.off} #{@cX.green}[keyword]#{@ ------------------------------------------ SiSU's License #{@cX.green}license#{@cX.off} sisu --help license + +for help type 'sisu --help', 'sisu --help [help request]', 'man sisu', (or see the system or online documentation) WOK # #{@cX.cyan}sisu_convert#{@cX.off} program for initial (very basic and partial) conversion to sisu file format (html and word97 supported) end @@ -1002,8 +1006,18 @@ WOK else "bin: #{@cX.brown}#{bin}#{@cX.off} rc: #{@cX.brown}#{rc}#{@cX.off}" end end + def sisu_version + version=SiSU_Env::Info_version.new.get_version + rb_ver=SiSU_Env::Info_version.new.rbversion + if version[:version] + tell=SiSU_Screen::Ansi.new('-v',version[:project],version[:version],version[:date_stamp],version[:date],rb_ver) + tell.version + else puts 'SiSU version information not available' + end + end def environment cf_defaults=SiSU_Env::Info_processing_flag.new + sisu_version x =<<WOK #{@cX.green}current and output directories#{@cX.off} user: #{@cX.blue}#{@env.user}#{@cX.off} @@ -1064,6 +1078,8 @@ WOK zap (delete output directories) #{@cX.blue}#{SiSU_Env::Info_settings.new.permission?('zap')}#{@cX.off} css copy (copy over css files) #{@cX.blue}#{SiSU_Env::Info_settings.new.permission?('css_modify')}#{@cX.off} (true/false defaults may be changed in active sisurc.yml file under permissions_set:) + +NOTE: for HELP type 'sisu --help', 'sisu --help [help request]', 'man sisu', (or see the system or online documentation) WOK print x end diff --git a/lib/sisu/v0/hub.rb b/lib/sisu/v0/hub.rb index 52937b8e..47326b88 100644 --- a/lib/sisu/v0/hub.rb +++ b/lib/sisu/v0/hub.rb @@ -315,13 +315,9 @@ p "here #{__FILE__} #{__LINE__}" if @opt =~/M/ end @opt.cmd=@opt.cmd + extra if @opt.cmd =~/[vVM]/ #% version information - version=SiSU_Env::Info_version.new.get_version - rb_ver=SiSU_Env::Info_version.new.rbversion - if version[:version] - tell=SiSU_Screen::Ansi.new(@opt.cmd,version[:project],version[:version],version[:date_stamp],version[:date],rb_ver) - tell.version - SiSU_Help::Help.new('env',@opt).environment if @opt.cmd =~/V/ and @opt.files.empty? #% environment - else puts 'SiSU version information not available' + if @opt.cmd =~/V/ and @opt.files.empty? #% environment + SiSU_Help::Help.new('env',@opt).environment + else SiSU_Help::Help.new('env',@opt).sisu_version end end if @opt.cmd =~/^-L$/; SiSU_Help::Help.new('license',@opt).help_request #% version information @@ -528,8 +524,7 @@ p "here #{__FILE__} #{__LINE__}" if @opt =~/M/ if defined? @@env.path.processing and FileTest.directory?(@@env.path.processing) and @@env.path.processing =~/#{@@env.user}$/ #clean temporary processing directory of content as is located in public area cd(@@env.path.processing_base_tmp) do rm_rf(@@env.user) unless @opt.cmd =~/M/ - end - end + end end elsif @opt.mod.inspect =~/--query/ require "#{SiSU_lib}/sst_identify_markup" puts SiSU_Markup::Markup_history.new(@opt).query @@ -550,7 +545,9 @@ p "here #{__FILE__} #{__LINE__}" if @opt =~/M/ else #% help instructions unless @opt.mod.inspect =~/--convert|--to|--from/ if @opt.mod.inspect =~/--help/ and not @opt.what.empty?; SiSU_Help::Help.new(@opt.what).help_request - else SiSU_Help::Help.new('list').help_request + elsif @opt.mod.inspect =~/--help/; SiSU_Help::Help.new('list').help_request + else SiSU_Help::Help.new('env',@opt).sisu_version + puts " for HELP type:\n\tsisu --help [help request]\n\tman sisu\n or see the system or online documentation" end end end diff --git a/lib/sisu/v0/sysenv.rb b/lib/sisu/v0/sysenv.rb index bf474f64..58ad1bf8 100644 --- a/lib/sisu/v0/sysenv.rb +++ b/lib/sisu/v0/sysenv.rb @@ -735,7 +735,6 @@ module SiSU_Env attr_accessor :filename,:sys,:home,:hostname,:user,:env,:rc,:www,:fnb,:fnn,:fnt,:flv,:webserv_path,:stub_pwd,:webserv_host_cgi,:webserv_port_cgi,:processing,:etc,:yamlrc_dir @@image_flag,@@local_image=true,true #warning on @@image_flag @@fb=@@man_path=nil,nil - #@@fb=nil def initialize(fns='',md=nil) super() #you may not want to re-execute this tatic info so frequently! @fns,@md=fns,md @@ -2096,7 +2095,7 @@ WOK end def images File.mkpath("#{@env.path.output}/_sisu") unless FileTest.directory?("#{@env.path.output}/_sisu") - File.symlink("../../_sisu/image", "#{@env.path.output}/_sisu/image") unless File.symlink?("#{@env.path.output}/_sisu/image") + File.symlink("../../_sisu/image", "#{@env.path.output}/_sisu/image") unless File.exist?("#{@env.path.output}/_sisu/image") or File.symlink?("#{@env.path.output}/_sisu/image") end def man_forms #File.symlink("../../man/form", "#{@env.path.output}/man/form") unless File.symlink?("#{@env.path.output}/man/form") == true |