From 5abc572129ac49178aa77ea59cb8e5d611e6374f Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Tue, 1 Mar 2011 20:46:02 -0500 Subject: v3: sysenv, separate out processing_path method plus consequences --- lib/sisu/v3/odf.rb | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'lib/sisu/v3/odf.rb') diff --git a/lib/sisu/v3/odf.rb b/lib/sisu/v3/odf.rb index f5a11bea..204f0e50 100644 --- a/lib/sisu/v3/odf.rb +++ b/lib/sisu/v3/odf.rb @@ -207,7 +207,7 @@ module SiSU_ODF w=/([0-9]+\.\d{0,3})/.match(w).captures.join image_source=image_src(i) pwd=Dir.pwd - cp("#{image_source}/#{i}","#{@env.path.processing_odf}/Pictures/#{i}") if image_source + cp("#{image_source}/#{i}","#{@env.processing_path.odf}/Pictures/#{i}") if image_source img=if i.to_s =~/jpg|png|gif/ \ and h.to_s =~/\d/ \ and w.to_s =~/\d/ @@ -506,7 +506,7 @@ module SiSU_ODF odf_tail #($1,$2) fix=[] bullet=image_src('bullet_09.png') - cp("#{bullet}/bullet_09.png","#{@env.path.processing_odf}/Pictures/.") #if image_src('bullet_09.png') + cp("#{bullet}/bullet_09.png","#{@env.processing_path.odf}/Pictures/.") #if image_src('bullet_09.png') odf_metadata data.each do |dob| #p dob.obj if dob.obj =~safe_characters and @md.cmd =~/V/ #KEEP @@ -686,9 +686,9 @@ module SiSU_ODF def odf #%odf output env=SiSU_Env::SiSU_file.new(@md) env.mkdir - env.make_path(@env.path.processing_odf) + env.make_path(@env.processing_path.odf) env.make_path(@md.file.output_path.odt) - filename="#{@env.path.processing_odf}/content.xml" + filename="#{@env.processing_path.odf}/content.xml" od=File.new(filename,'w+') @content.each do |para| # this is a hack od.puts para unless para =~/\A\s*\Z/ @@ -697,7 +697,7 @@ module SiSU_ODF opendoc=@md.fn[:odf] mkdir_p(@md.file.output_path.odt) unless FileTest.directory?(@md.file.output_path.odt) system(" - cd #{@env.path.processing_odf} + cd #{@env.processing_path.odf} zip -qr #{opendoc} * mv #{opendoc} #{@md.file.place_file.odt} cd #{Dir.pwd} @@ -730,9 +730,9 @@ page break notes?? [you could add a note number for every object/paragraph!] - cd(@env.path.processing_odf) + cd(@env.processing_path.odf) structure=[] - Find.find(@env.path.processing_odf) do |f| + Find.find(@env.processing_path.odf) do |f| structure << puts f end open(opendoc,'wb') do |f| -- cgit v1.2.3