From f949d5fc4ac4317c25daa82b745cf91a0da3bb3e Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Wed, 6 Mar 2013 18:13:43 -0500 Subject: v4: sysenv, base images path determined from given path for sisu executable * where system sisu not called directly --- lib/sisu/v4/sysenv.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'lib') diff --git a/lib/sisu/v4/sysenv.rb b/lib/sisu/v4/sysenv.rb index c3f69c85..f3191be1 100644 --- a/lib/sisu/v4/sysenv.rb +++ b/lib/sisu/v4/sysenv.rb @@ -2145,7 +2145,6 @@ WOK else sisupod_processing_path + '/' + Gt[:doc] end -#p sisup od_processing_path_lng unless FileTest.directory?(sisupod_processing_path_lng) #puts "a processing directory (#{sisupod_processing_path_lng}) is being created for use by sisu" FileUtils::mkdir_p(sisupod_processing_path_lng) @@ -5956,7 +5955,9 @@ WOK cp_images(src,dest) if FileTest.directory?(src) end def cp_base_images #fix images - src="#{@env.path.share}/image" + src=SiSU_path_base \ + ? SiSU_path_base + '/data/sisu/image' + : "#{@env.path.share}/image" dest_arr=[ "#{@env.path.webserv}/_sisu/image_sys", "#{@env.path.webserv}/#{@env.path.stub_pwd}/_sisu/image_sys" -- cgit v1.2.3 From 8b8f2e95df9a0f8af4ec0b6c6f423db7f8456086 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Wed, 6 Mar 2013 18:17:30 -0500 Subject: v4: options, sisupod, name determination, fix * needed for creation of multiple sisupods --- lib/sisu/v4/options.rb | 19 ++++--------------- lib/sisu/v4/shared_sisupod_source.rb | 10 +++++----- 2 files changed, 9 insertions(+), 20 deletions(-) (limited to 'lib') diff --git a/lib/sisu/v4/options.rb b/lib/sisu/v4/options.rb index 6e5f7ca4..724fd9a9 100644 --- a/lib/sisu/v4/options.rb +++ b/lib/sisu/v4/options.rb @@ -504,7 +504,7 @@ module SiSU_Commandline case m when /^--(?:color-toggle)$/; c=c+'c' when /^--(?:color-off)$/; c=c+'k' - when /^--(?:configure|init-site)$/; c=c+'CC' + when /^--(?:conf|config|configure|init|initialize|init-site)$/; c=c+'CC' when /^--(?:dal?|machine|abstraction|abs)$/; c=c+'m' when /^--(?:txt|text|plaintext)$/; c=c+'t' when /^--(?:html)$/; c=c+'h' @@ -606,7 +606,7 @@ module SiSU_Commandline ? { bool: true, set: :on } : { bool: false, set: :na } act[:site_init]=(cmd =~/C/ \ - || mod.inspect =~/"--init-site"|"--configure"/) \ + || mod.inspect =~/"--init"|"--initialize"|"--init-site"|"--conf"|"--config"|"--configure"/) \ ? { bool: true, set: :on } : { bool: false, set: :na } act[:rc]=if mod.inspect =~/"--rc=/ @@ -1012,7 +1012,6 @@ module SiSU_Commandline def files_mod files_mod=files @files_mod=files_mod - @files_mod end def f_pth @f_pth @@ -1030,20 +1029,10 @@ module SiSU_Commandline @lng_base end def fno - @fno=if @fno \ - and not @fno.empty? - @fno - else - fns[/(.+?(?:sst|ssm))(?:\.sst)?/,1] - end + @fno=fns[/(.+?(?:sst|ssm))(?:\.sst)?/,1] end def fng - @fng=if @fng \ - and not @fng.empty? - @fng - else - fno.gsub(/(?:~(?:#{Px[:lng_lst_rgx]}))?(\.ss[tm])$/,'\1') - end + @fng=fno.gsub(/(?:~(?:#{Px[:lng_lst_rgx]}))?(\.ss[tm])$/,'\1') end def fns @fns diff --git a/lib/sisu/v4/shared_sisupod_source.rb b/lib/sisu/v4/shared_sisupod_source.rb index 192648cf..0ec739bb 100644 --- a/lib/sisu/v4/shared_sisupod_source.rb +++ b/lib/sisu/v4/shared_sisupod_source.rb @@ -68,13 +68,13 @@ module SiSU_Source @opt=opt m=/.+\/(?:src\/)?(\S+)/im @date=SiSU_Env::InfoDate.new.dt - @env=SiSU_Env::InfoEnv.new(@opt.fns) + @env=SiSU_Env::InfoEnv.new(opt.fns) @ver=SiSU_Env::InfoVersion.instance.get_version - @v=(@opt.cmd =~/[VM]/) ? 'v' : '' + @v=(opt.cmd =~/[VM]/) ? 'v' : '' @particulars=SiSU_Particulars::CombinedSingleton.instance.get_all(opt) @file=@particulars.file @local_path="#{@file.output_path.sisupod.dir}" - processing_sisupod=@env.processing_path.processing_sisupod(@opt) + processing_sisupod=@env.processing_path.processing_sisupod(opt) processing_sisupod.make path_pod=processing_sisupod.paths[:sisupod] path_pod_fnb=processing_sisupod.paths[:fnb] @@ -82,8 +82,8 @@ module SiSU_Source @path_pod={ fnb: path_pod_fnb, pod: path_pod, - doc: path_pod + '/' + Gt[:doc] + '/' + @opt.lng, - po: path_pod + '/' + Gt[:po] + '/' + @opt.lng, + doc: path_pod + '/' + Gt[:doc] + '/' + opt.lng, + po: path_pod + '/' + Gt[:po] + '/' + opt.lng, pot: path_pod + '/' + Gt[:pot], conf: path_pod + '/' + Gt[:conf], image: path_pod + '/' + Gt[:image], -- cgit v1.2.3 From 7725af739f103c706d97fb7bff031c7829edf67d Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Wed, 6 Mar 2013 18:22:23 -0500 Subject: v4: html_format, html segment navigation to toc, fix --- lib/sisu/v4/html_format.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/sisu/v4/html_format.rb b/lib/sisu/v4/html_format.rb index f96db380..d2c12154 100644 --- a/lib/sisu/v4/html_format.rb +++ b/lib/sisu/v4/html_format.rb @@ -106,7 +106,7 @@ module SiSU_HTML_Format @stylesheet=SiSU_Style::CSS_HeadInfo.new(md).stylesheet @o_str ||=SiSU_Env::ProcessingSettings.new(md).output_dir_structure @index,@metalink='index','#metadata' - @toc="#{@md.file.output_path.html_seg.dir}/#{@md.file.base_filename.html_segtoc}" + @toc=@md.file.base_filename.html_segtoc end def url_path_image_sys (@o_str.dump_or_redirect?) \ -- cgit v1.2.3