From 2ec7a07f1a896a666fea65c109d0e344e0600651 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Tue, 13 Sep 2011 19:12:09 -0400 Subject: v3: correct sisupod references and path to .txz (replace .zip) --- lib/sisu/v3/param.rb | 4 +--- lib/sisu/v3/sysenv.rb | 14 +++++++------- lib/sisu/v3/urls.rb | 8 ++++---- 3 files changed, 12 insertions(+), 14 deletions(-) (limited to 'lib') diff --git a/lib/sisu/v3/param.rb b/lib/sisu/v3/param.rb index 1be55583..f9d7ecb0 100644 --- a/lib/sisu/v3/param.rb +++ b/lib/sisu/v3/param.rb @@ -989,13 +989,11 @@ module SiSU_Param m=/((.+?)(?:\~\w\w(?:_\w\w)?)?)\.((?:-|ssm\.)?sst|ssm|ssi)$/ #watch added match for sss @fnn,@fnb,@fnt=@fns[m,1],@fns[m,2],@fns[m,3] @flv=@env.document_language_versions_found[:f] - #@fnz=(@fns =~/\.(?:ssm\.sst|ssm)$/) ? (@fnn + '.ssm.zip') : (@fnn + '.sst.zip') else m=/((.+?)(?:\~\w\w(?:_\w\w)?)?)\.((?:-|ssm\.)?sst|ssm)$/ #watch added match for sss - #m=/((.+?)(?:\~\w{2,5})?)\.((?:-|ssm\.)?sst|ssm)$/ #watch added match for sss @fnn,@fnb,@fnt=@fns[m,1],@fns[m,2],@fns[m,3] @flv=@env.document_language_versions_found[:f] - @fnz=(@fns =~/\.(?:ssm\.sst|ssm)$/) ? (@fnn + '.ssm.zip') : (@fnn + '.sst.zip') + @fnz=(@fns =~/\.(?:ssm\.sst|ssm)$/) ? (@fnn + '.ssm.txz') : (@fnn + '.sst.txz') end @papersize=@env.papersize #'A4' #default size #get first from SiSU_Env:: # @env is probably no longer most appropriate name! as default info is more general @sfx_src=@fns[m,2] diff --git a/lib/sisu/v3/sysenv.rb b/lib/sisu/v3/sysenv.rb index 475a8369..a24937d2 100644 --- a/lib/sisu/v3/sysenv.rb +++ b/lib/sisu/v3/sysenv.rb @@ -381,9 +381,9 @@ module SiSU_Env @@fnb ||=@fns[m,2] @@fnt ||=@fns[m,3] @@flv ||=document_language_versions_found[:f] - unless @@fns =~/\S+?\.zip/ - @@fnz ||=if @@fns =~/(?:\~\S{2,3})?\.(?:ssm\.sst|ssm)$/; @@fnb + '.ssm.zip' - elsif @@fnb; @@fnb + '.sst.zip' + unless @@fns =~/\S+?\.txz/ + @@fnz ||=if @@fns =~/(?:\~\S{2,3})?\.(?:ssm\.sst|ssm)$/; @@fnb + '.ssm.txz' + elsif @@fnb; @@fnb + '.sst.txz' else '' # e.g. termsheet end end @@ -2731,7 +2731,7 @@ WOK def src # consider if @opt.fnb \ and not @opt.fnb.empty? - sm="#{@env.path.output}/pod/#{@opt.fns}.zip" + sm="#{@env.path.output}/src/pod/#{@opt.fns}.txz" rm(sm) if FileTest.file?(sm) sm="#{@env.path.output}/src/#{@opt.fns}" rm(sm) if FileTest.file?(sm) @@ -2853,7 +2853,7 @@ WOK remote_src="#{remote_conn[:name]}/#{@env.path.stub_src}/." remote_pod="#{remote_conn[:name]}/#{@env.path.stub_pod}/." src_txt=@opt.fnc - src_pod=@opt.fncb.gsub(/(\.ss[mt])(?:\.sst)?$/,'\1.zip') + src_pod=@opt.fncb.gsub(/(\.ss[mt])(?:\.sst)?$/,'\1.txz') if (local_gen =~/\S/ \ and local_gen !~/\/\//) \ and (remote_gen =~/\S/ \ @@ -2876,7 +2876,7 @@ WOK if FileTest.file?("#{local_src}/#{src_doc}") puts "#{local_src}/#{src_doc}* -> #{remote_src}" end - if FileTest.file?("#{local_pod}/#{src_doc}.zip") + if FileTest.file?("#{local_pod}/#{src_doc}.txz") puts "#{local_pod}/#{src_doc}* -> #{remote_pod}" end else @@ -3051,7 +3051,7 @@ WOK puts "#{__FILE__} #{__LINE__}" if @opt.cmd =~/M/ puts "#{local_gen} -> #{remote_gen}" if FileTest.file?("#{local_src}/#{src_doc}") \ - or FileTest.file?("#{local_src}/#{src_doc}.zip") + or FileTest.file?("#{local_src}/#{src_doc}.txz") puts "#{local_src}/#{src_doc}* -> #{remote_src}" end else diff --git a/lib/sisu/v3/urls.rb b/lib/sisu/v3/urls.rb index cbb11ba5..a6612175 100644 --- a/lib/sisu/v3/urls.rb +++ b/lib/sisu/v3/urls.rb @@ -134,7 +134,7 @@ module SiSU_urls SiSU_Screen::Ansi.new(@opt.cmd,"[#{@opt.f_pth[:lng_is]}] -#{x}","#{@prog.text_editor} #{@md.file.output_path.src.dir}/#{y}").result end def pod(x,y) - SiSU_Screen::Ansi.new(@opt.cmd,"[#{@opt.f_pth[:lng_is]}] -#{x}","#{@prog.web_browser} #{@env.url.output_tell}/pod/#{y}").result + SiSU_Screen::Ansi.new(@opt.cmd,"[#{@opt.f_pth[:lng_is]}] -#{x}","#{@prog.web_browser} #{@env.url.output_tell}/src/pod/#{y}").result end self end @@ -347,9 +347,9 @@ module SiSU_urls end if x=~/^S/ \ and @opt.cmd =~/S/ - zipfile=if @opt.fns =~/\.ssm\.sst$/; y.gsub(/(?:\~\S{2,3})?(\.ssm\.sst\.zip)$/,'.ssm.zip') - else y.gsub(/(?:\~\S{2,3})?(\.sst\.zip)$/,'\1') - end + (@opt.fns =~/\.ssm\.sst$/) \ + ? y.gsub(/(?:\~\S{2,3})?(\.ssm.sst\.txz)$/,'.ssm.txz') + : y.gsub(/(?:\~\S{2,3})?(\.sst\.txz)$/,'\1') show.source.pod(x,y) end if x=~/^s/ \ -- cgit v1.2.3