aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v3/odf.rb
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2011-03-01 20:46:02 -0500
committerRalph Amissah <ralph@amissah.com>2011-03-01 20:46:02 -0500
commit5abc572129ac49178aa77ea59cb8e5d611e6374f (patch)
tree9c3402a3d8fa17d1a3c7a4c8bcc81230d12cc2be /lib/sisu/v3/odf.rb
parentv3: space between each and opening curly brace e.g. "x.each {|y| p y}" (diff)
v3: sysenv, separate out processing_path method plus consequences
Diffstat (limited to 'lib/sisu/v3/odf.rb')
-rw-r--r--lib/sisu/v3/odf.rb14
1 files changed, 7 insertions, 7 deletions
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|