aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v3/epub.rb
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2011-08-09 00:06:18 -0400
committerRalph Amissah <ralph@amissah.com>2011-08-09 00:06:20 -0400
commit532c0301d456758990609bdf65b718ce2f1f32ca (patch)
treef8c142d36f20acbe21e875c5fe049d841bbd986a /lib/sisu/v3/epub.rb
parentv3: 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/epub.rb')
-rw-r--r--lib/sisu/v3/epub.rb9
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/sisu/v3/epub.rb b/lib/sisu/v3/epub.rb
index 2522b68a..83a0a795 100644
--- a/lib/sisu/v3/epub.rb
+++ b/lib/sisu/v3/epub.rb
@@ -198,7 +198,7 @@ module SiSU_EPUB
toc=nil
@@firstseg=nil
@@toc={ seg: [], seg_mini: [], scr: [], ncx: [], opf: [] }
- md_opf_a_content,md_opf_a_spine=[],[]
+ md_opf_a_content,md_opf_a_spine,md_opf_a_guide=[],[],[]
@nav_no=1
@@toc[:ncx] << @epub.toc_ncx.open #epub ncx navmap
@@toc[:ncx] << @epub.toc_ncx.head_open << @epub.toc_ncx.head << @epub.toc_ncx.head_close
@@ -212,6 +212,7 @@ module SiSU_EPUB
@@toc[:scr] << %{<div class="content">\n<div class="substance">}
md_opf_a_content << @epub.metadata_opf.manifest_content_sisu_toc
md_opf_a_spine << @epub.metadata_opf.spine_sisu_toc
+ md_opf_a_guide << @epub.metadata_opf.guide_sisu_toc
@ncxo=[nil,false,false,false,false,false,false]
@dob_toc2,@dob_toc3=nil,nil
@ncx_cls=[]
@@ -254,6 +255,7 @@ module SiSU_EPUB
@ncxo[4]=true
md_opf_a_content << @epub.metadata_opf.manifest_content(dob_toc)
md_opf_a_spine << @epub.metadata_opf.spine(dob_toc)
+ md_opf_a_guide << @epub.metadata_opf.guide(dob_toc)
Toc.new(@md,dob_toc).level_4
when 5; Toc.new(@md,dob_toc).level_5
when 6; Toc.new(@md,dob_toc).level_6
@@ -288,6 +290,7 @@ module SiSU_EPUB
@@toc[:ncx] << @epub.toc_ncx.close
@@toc[:opf] << md_opf_a_content << @epub.metadata_opf.manifest_close
@@toc[:opf] << @epub.metadata_opf.spine_open << md_opf_a_spine << @epub.metadata_opf.spine_close
+ @@toc[:opf] << @epub.metadata_opf.guide_open << md_opf_a_guide << @epub.metadata_opf.guide_close
@@toc[:opf] << @epub.metadata_opf.package_close
@@toc[:opf]=@@toc[:opf].flatten
Epub_output.new(@md,@@toc[:opf]).epub_metadata_opf
@@ -629,9 +632,9 @@ module SiSU_EPUB
def images
img_pth=@md.env.path.image_source_include
@md.ec[:image].each do |x|
- if FileTest.directory?("#{@md.env.processing_path.epub}/OPS/image") \
+ if FileTest.directory?("#{@md.env.processing_path.epub}/#{Ep[:d_oebps]}/image") \
and FileTest.file?("#{img_pth}/#{x}")
- cp("#{img_pth}/#{x}","#{@md.env.processing_path.epub}/OPS/image")
+ cp("#{img_pth}/#{x}","#{@md.env.processing_path.epub}/#{Ep[:d_oebps]}/image")
end
end
end