From 6d46257531b1384a3bff974e039b70f7a45c3ecc Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Sat, 15 Oct 2011 13:57:29 -0400 Subject: v2 v3: odf:odt v1.0: make odt header easier to track; remove binary blob * make odt header changes easier to track (this commit maintains rough equivalence to sisu-3.1.0 headers) * sysenv, builds odf:odt directory structure instead of binary blob * get rid of odf:odt (binary changeset) blob zipfile (containing odf:odt directory structure) --- lib/sisu/v2/sysenv.rb | 33 +++++++++++++++++++++------------ 1 file changed, 21 insertions(+), 12 deletions(-) (limited to 'lib/sisu/v2/sysenv.rb') diff --git a/lib/sisu/v2/sysenv.rb b/lib/sisu/v2/sysenv.rb index d3152947..38ea24a2 100644 --- a/lib/sisu/v2/sysenv.rb +++ b/lib/sisu/v2/sysenv.rb @@ -7,7 +7,7 @@ * Author: Ralph Amissah - * Copyright: (C) 1997 - 2010, Ralph Amissah, All Rights Reserved. + * Copyright: (C) 1997 - 2011, Ralph Amissah, All Rights Reserved. * License: GPL 3 or later: @@ -1527,7 +1527,16 @@ WOK mkdir_p(pth) unless FileTest.directory?(pth) pth end - def epub_bld #(md) + def odf_bld + rm_rf(path.odf) + mkdir_p(path.odf) unless FileTest.directory?(path.odf) + mkdir_p("#{path.odf}/Configurations2") unless FileTest.directory?("#{path.odf}/Configurations2") + mkdir_p("#{path.odf}/META-INF") unless FileTest.directory?("#{path.odf}/META-INF") + mkdir_p("#{path.odf}/Pictures") unless FileTest.directory?("#{path.odf}/Pictures") + mkdir_p("#{path.odf}/Thumbnails") unless FileTest.directory?("#{path.odf}/Thumbnails") + path.odf + end + def epub_bld mkdir_p(path.epub) unless FileTest.directory?(path.epub) mkdir_p("#{path.epub}/META-INF") unless FileTest.directory?("#{path.epub}/META-INF") mkdir_p("#{path.epub}/OPS/image") unless FileTest.directory?("#{path.epub}/OPS/image") @@ -1547,8 +1556,8 @@ WOK end def tex pth=if defined? @rc['processing']['latex'] \ - and not @rc['processing']['latex'].nil? \ - and not @rc['processing']['latex'].empty? + and not @rc['processing']['latex'].nil? \ + and not @rc['processing']['latex'].empty? "#{processing}/#{@rc['processing']['latex']}" else "#{processing}/#{defaults[:processing_latex]}" end @@ -1557,8 +1566,8 @@ WOK end def texi pth=if defined? @rc['processing']['texinfo'] \ - and not @rc['processing']['texinfo'].nil? \ - and not @rc['processing']['texinfo'].empty? + and not @rc['processing']['texinfo'].nil? \ + and not @rc['processing']['texinfo'].empty? "#{processing}/#{@rc['processing']['texinfo']}" else "#{processing}/#{defaults[:processing_texinfo]}" end @@ -1570,8 +1579,8 @@ WOK end def lout pth=if defined? @rc['processing']['lout'] \ - and not @rc['processing']['lout'].nil? \ - and not @rc['processing']['lout'].empty? + and not @rc['processing']['lout'].nil? \ + and not @rc['processing']['lout'].empty? "#{processing}/#{@rc['processing']['lout']}" else "#{processing}/#{defaults[:processing_lout]}" end @@ -1580,8 +1589,8 @@ WOK end def sqlite pth=if defined? @rc['processing']['sqlite'] \ - and not @rc['processing']['sqlite'].nil? \ - and not @rc['processing']['sqlite'].empty? + and not @rc['processing']['sqlite'].nil? \ + and not @rc['processing']['sqlite'].empty? "#{processing}/#{@rc['processing']['sqlite']}" else "#{processing}/#{defaults[:processing_sqlite]}" end @@ -1590,8 +1599,8 @@ WOK end def postgresql pth=if defined? @rc['processing']['postgresql'] \ - and not @rc['processing']['postgresql'].nil? \ - and not @rc['processing']['postgresql'].empty? + and not @rc['processing']['postgresql'].nil? \ + and not @rc['processing']['postgresql'].empty? "#{processing}/#{@rc['processing']['postgresql']}" else "#{processing}/#{defaults[:processing_postgresql]}" end -- cgit v1.2.3