5. Package processing¶
Generate all the auxiliary files that are needed for EPUB: package file, table of content in different formats, cover page. Most of the files make use of various templates stored in the separate template file.
5.1. Module Content¶
-
class
rp2epub.package.
Package
(driver)[source]¶ Collection of methods to generate the manifest, TOC in different formats, and the cover pages
Parameters: driver ( DocWrapper
) – the callerCreate a new style TOC file (‘nav’ file):
nav.xhtml
.
-
_create_ncx
()[source]¶ Create and old style TOC file (‘ncx’ file):
toc.ncx
. To be used for reading systems that cannot handle EPUB3 specific TOC.
-
_create_opf
()[source]¶ Create the manifest file. Includes the list of resources, book metadata, and the spine. The manifest file is added to the book as
package.opf
-
book
¶ The target book; a
utils.Book
instance
-
document
¶ Encapsulation of the real document; a
document.Document
instance