aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v3/odf.rb
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2011-09-05 11:16:58 -0400
committerRalph Amissah <ralph@amissah.com>2011-09-05 11:16:58 -0400
commit9573bcd777e186e18840d9dcb22c11433cc8c964 (patch)
tree2a9704efaa989af4cadca9ea6249cd48b0ad6993 /lib/sisu/v3/odf.rb
parentdebian/changelog (3.0.16-1) (diff)
parentv3: sisupod_v3 make (build); place (rsync); process (generate sisu output from) (diff)
Merge commit 'sisu-3.0.17' into debian/sid
Diffstat (limited to 'lib/sisu/v3/odf.rb')
-rw-r--r--lib/sisu/v3/odf.rb21
1 files changed, 12 insertions, 9 deletions
diff --git a/lib/sisu/v3/odf.rb b/lib/sisu/v3/odf.rb
index 49856a87..1919fa08 100644
--- a/lib/sisu/v3/odf.rb
+++ b/lib/sisu/v3/odf.rb
@@ -84,10 +84,10 @@ module SiSU_ODF
@env.odf_structure
unless @opt.cmd =~/q/
tool=(@opt.cmd =~/[MVv]/) \
- ? "#{@env.program.odf_viewer} file://#{@md.file.output_path.odt.dir}/#{@md.file.base_filename.odt}" \
+ ? "#{@env.program.odf_viewer} file://#{@md.file.output_path.odt.dir}/#{@md.file.base_filename.odt}"
: "[#{@opt.f_pth[:lng_is]}] #{@opt.fns}"
@opt.cmd=~/[MVvz]/ \
- ? SiSU_Screen::Ansi.new(@opt.cmd,'Opendocument (ODF:ODT)',tool).green_hi_blue \
+ ? SiSU_Screen::Ansi.new(@opt.cmd,'Opendocument (ODF:ODT)',tool).green_hi_blue
: SiSU_Screen::Ansi.new(@opt.cmd,'Opendocument (ODF:ODT)',tool).green_title_hi
SiSU_Screen::Ansi.new(@opt.cmd,@opt.fns,"file://#{@md.file.output_path.odt.dir}/#{@md.file.base_filename.odt}").flow if @opt.cmd =~/[MV]/
end
@@ -266,7 +266,7 @@ module SiSU_ODF
end
t=map_nametags[url] \
&& map_nametags[url][:segname] \
- ? %{<text:a xlink:type="simple" xlink:href="#{@env.url.root}/#{@md.fnb}/#{map_nametags[url][:segname]}#{Sfx[:html]}##{url}">#{txt.strip}</text:a>#{trail}} \
+ ? %{<text:a xlink:type="simple" xlink:href="#{@env.url.root}/#{@md.fnb}/#{map_nametags[url][:segname]}#{Sfx[:html]}##{url}">#{txt.strip}</text:a>#{trail}}
: %{#{txt.strip}#{trail}}
end
t
@@ -714,12 +714,15 @@ module SiSU_ODF
od.close
opendoc=@md.fn[:odf]
mkdir_p(@md.file.output_path.odt.dir) unless FileTest.directory?(@md.file.output_path.odt.dir)
- system("
- cd #{@env.processing_path.odf}
- zip -qr #{opendoc} *
- mv #{opendoc} #{@md.file.place_file.odt.dir}
- cd #{Dir.pwd}
- ")
+ if FileTest.directory?(@env.processing_path.odf)
+ pwd=Dir.pwd
+ Dir.chdir(@env.processing_path.odf)
+ system("
+ zip -qr #{opendoc} *
+ mv #{opendoc} #{@md.file.place_file.odt.dir}
+ ")
+ Dir.chdir(pwd)
+ end
end
end
end