aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v3/odf.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sisu/v3/odf.rb')
-rw-r--r--lib/sisu/v3/odf.rb19
1 files changed, 17 insertions, 2 deletions
diff --git a/lib/sisu/v3/odf.rb b/lib/sisu/v3/odf.rb
index c7b60bb5..4985b3dd 100644
--- a/lib/sisu/v3/odf.rb
+++ b/lib/sisu/v3/odf.rb
@@ -187,6 +187,15 @@ module SiSU_ODF
image_source=if @md.fns =~/\.ss[tm]$/ \
and FileTest.file?("#{@env.path.image_source_include}/#{i}") #review
@env.path.image_source_include
+ elsif @md.opt.f_pth[:pth] =~/\/\S+?\/sisupod\/\S+?\/sisupod\/doc/
+ pt=/(\/\S+?\/sisupod\/\S+?\/sisupod)\/doc/.match(@md.opt.f_pth[:pth])[1]
+ img_src=pt + '/image'
+ if FileTest.file?("#{img_src}/#{i}")
+ img_src
+ else
+ SiSU_Screen::Ansi.new(@md.opt.cmd,"ERROR - image:",%{"#{i}" missing},"search locations: #{@env.path.image_source_include_local},#{@env.path.image_source_include_remote} and #{@env.path.image_source_include}").error2 unless @md.opt.cmd =~/q/
+ nil
+ end
elsif @md.fns =~/\.ss[tm]$/ \
and FileTest.file?("#{@env.path.image_source_include_local}/#{i}") #review
@env.path.image_source_include_local
@@ -215,7 +224,10 @@ module SiSU_ODF
image_source=image_src(i)
pwd=Dir.pwd
if image_source
- FileUtils::cp("#{image_source}/#{i}","#{@env.processing_path.odt}/Pictures/#{i}")
+ if FileTest.file?("#{image_source}/#{i}")
+ FileUtils::cp("#{image_source}/#{i}","#{@env.processing_path.odt}/Pictures/#{i}")
+ else STDERR.puts %{\t*WARN* did not find image - "#{image_source}/#{i}" [#{__FILE__}:#{__LINE__}]}
+ end
end
img=if i.to_s =~/jpg|png|gif/ \
and h.to_s =~/\d/ \
@@ -522,7 +534,10 @@ module SiSU_ODF
fix=[]
bullet=image_src('bullet_09.png')
if bullet
- FileUtils::cp("#{bullet}/bullet_09.png","#{@env.processing_path.odt}/Pictures/.")
+ if FileTest.file?("#{bullet}/bullet_09.png")
+ FileUtils::cp("#{bullet}/bullet_09.png","#{@env.processing_path.odt}/Pictures/.")
+ else STDERR.puts %{\t*WARN* did not find image - "#{bullet}/bullet_09.png" [#{__FILE__}:#{__LINE__}]}
+ end
end
odf_metadata
data.each do |dob|