diff options
author | Ralph Amissah <ralph@amissah.com> | 2011-08-09 00:06:18 -0400 |
---|---|---|
committer | Ralph Amissah <ralph@amissah.com> | 2011-08-09 00:06:20 -0400 |
commit | 532c0301d456758990609bdf65b718ce2f1f32ca (patch) | |
tree | f8c142d36f20acbe21e875c5fe049d841bbd986a /lib/sisu/v3/sysenv.rb | |
parent | v3: constants, re-arranged (diff) |
v3: epub, constants, experiment with presentationsisu_3.0.15sisu-3.0.15
* disable some internal "features"
* make file and directory naming more flexible, now using
'OEBPS', 'toc.ncx', 'content.opf',
* adjustment of some headers and general tuning
* add opf guide
* clean processing directory between each build
* constants, added constants Ep (for epub)
* constants, added DISABLE (used here with epub)
Diffstat (limited to 'lib/sisu/v3/sysenv.rb')
-rw-r--r-- | lib/sisu/v3/sysenv.rb | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/lib/sisu/v3/sysenv.rb b/lib/sisu/v3/sysenv.rb index c265b010..80069f9d 100644 --- a/lib/sisu/v3/sysenv.rb +++ b/lib/sisu/v3/sysenv.rb @@ -1848,15 +1848,16 @@ WOK "#{processing}/epub/#{@fnb}" end def epub_bld #(md) + rm_rf(processing_path.epub) if FileTest.directory?(processing_path.epub) mkdir_p(processing_path.epub) unless FileTest.directory?(processing_path.epub) mkdir_p("#{processing_path.epub}/META-INF") unless FileTest.directory?("#{processing_path.epub}/META-INF") - mkdir_p("#{processing_path.epub}/OPS/image") unless FileTest.directory?("#{processing_path.epub}/OPS/image") - mkdir_p("#{processing_path.epub}/OPS/css") unless FileTest.directory?("#{processing_path.epub}/OPS/css") + mkdir_p("#{processing_path.epub}/#{Ep[:d_oebps]}/image") unless FileTest.directory?("#{processing_path.epub}/#{Ep[:d_oebps]}/image") + mkdir_p("#{processing_path.epub}/#{Ep[:d_oebps]}/css") unless FileTest.directory?("#{processing_path.epub}/#{Ep[:d_oebps]}/css") images=%W[bullet_09.png arrow_next_red.png arrow_prev_red.png arrow_up_red.png] processing_path.epub end def epub_cp_images(md) - pth="#{processing_path.epub}/OPS/image" + pth="#{processing_path.epub}/#{Ep[:d_oebps]}/image" mkdir_p(pth) unless FileTest.directory?(pth) src="#{path.share}/image" images=%W[bullet_09.png arrow_next_red.png arrow_prev_red.png arrow_up_red.png] @@ -4446,27 +4447,27 @@ WOK def epub @pth=@env.processing_path.epub def xhtml_index - filename_index="#{@pth}/OPS/index.xhtml" + filename_index="#{@pth}/#{Ep[:d_oebps]}/index.xhtml" File.new(filename_index,'w+') end def xhtml_segtoc - filename_segtoc="#{@pth}/OPS/toc.xhtml" + filename_segtoc="#{@pth}/#{Ep[:d_oebps]}/toc.xhtml" File.new(filename_segtoc,'w+') end def mimetype #fixed application/epub+zip ~/grotto/theatre/dbld/builds/epub_sample/mimetype File.new("#{@pth}/mimetype",'w') end def metadata #variable matadata ~/grotto/theatre/dbld/builds/epub_sample/metadata.opf - File.new("#{@pth}/OPS/epb.opf",'w') + File.new("#{@pth}/#{Ep[:d_oebps]}/#{Ep[:f_opf]}",'w') end def toc_ncx #variable toc ~/grotto/theatre/dbld/builds/epub_sample/toc.ncx - File.new("#{@pth}/OPS/epb.ncx",'w') + File.new("#{@pth}/#{Ep[:d_oebps]}/#{Ep[:f_ncx]}",'w') end def metainf_cont #variable content ~/grotto/theatre/dbld/builds/epub_sample/META-INF/container.xml File.new("#{@pth}/META-INF/container.xml",'w') end def xhtml_css #fixed epub xhtml css - File.new("#{@pth}/OPS/css/xhtml.css",'w') + File.new("#{@pth}/#{Ep[:d_oebps]}/css/xhtml.css",'w') end self end |