aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v3/odf.rb
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2011-11-11 00:08:04 -0500
committerRalph Amissah <ralph@amissah.com>2011-11-11 00:08:04 -0500
commitd17e7245922a9bdc9233ccfa0137dfdab5747356 (patch)
tree27c1c6e3866fe69af3de653bc1656b5be5740827 /lib/sisu/v3/odf.rb
parentv3: 3.1.4 version & changelog "opened" (diff)
v3: FileUtils, make explicit calls (more verbose, easier to find)
Diffstat (limited to 'lib/sisu/v3/odf.rb')
-rw-r--r--lib/sisu/v3/odf.rb14
1 files changed, 6 insertions, 8 deletions
diff --git a/lib/sisu/v3/odf.rb b/lib/sisu/v3/odf.rb
index 3bd59e81..4cb6664b 100644
--- a/lib/sisu/v3/odf.rb
+++ b/lib/sisu/v3/odf.rb
@@ -71,8 +71,6 @@ module SiSU_ODF
class Source
require 'zlib'
require 'find'
- require 'fileutils'
- include FileUtils
def initialize(opt)
@opt=opt
@particulars=SiSU_Particulars::Combined_singleton.instance.get_all(opt)
@@ -215,7 +213,7 @@ module SiSU_ODF
image_source=image_src(i)
pwd=Dir.pwd
if image_source
- cp("#{image_source}/#{i}","#{@env.processing_path.odt}/Pictures/#{i}")
+ FileUtils::cp("#{image_source}/#{i}","#{@env.processing_path.odt}/Pictures/#{i}")
end
img=if i.to_s =~/jpg|png|gif/ \
and h.to_s =~/\d/ \
@@ -523,7 +521,7 @@ module SiSU_ODF
fix=[]
bullet=image_src('bullet_09.png')
if bullet
- cp("#{bullet}/bullet_09.png","#{@env.processing_path.odt}/Pictures/.")
+ FileUtils::cp("#{bullet}/bullet_09.png","#{@env.processing_path.odt}/Pictures/.")
end
odf_metadata
data.each do |dob|
@@ -744,7 +742,7 @@ WOK
end
od.close
opendoc=@md.fn[:odf]
- mkdir_p(@md.file.output_path.odt.dir) unless FileTest.directory?(@md.file.output_path.odt.dir)
+ FileUtils::mkdir_p(@md.file.output_path.odt.dir) unless FileTest.directory?(@md.file.output_path.odt.dir)
if FileTest.directory?(@env.processing_path.odt)
pwd=Dir.pwd
Dir.chdir(@env.processing_path.odt)
@@ -782,7 +780,7 @@ page break
notes?? [you could add a note number for every object/paragraph!]
- cd(@env.processing_path.odt)
+ FileUtils::cd(@env.processing_path.odt)
structure=[]
Find.find(@env.processing_path.odt) do |f|
structure << puts f
@@ -795,8 +793,8 @@ notes?? [you could add a note number for every object/paragraph!]
zip.close
end
#zip -qr #{opendoc} *
- mv(opendoc,"#{@env.path.output}/#{@md.fnb}/.")
- cd(Dir.pwd)
+ FileUtils::mv(opendoc,"#{@env.path.output}/#{@md.fnb}/.")
+ FileUtils::cd(Dir.pwd)
<text:span text:style-name="T6">●</text:span> #bullet
dob.obj.gsub!(/^(#{Mx[:pa_o]}:i[1-9]#{Mx[:pa_c]})\s*#{Mx[:gl_bullet]}/,'\1 <text:span text:style-name="T6">·</text:span> ') #bullet