Arrays of query/attribute pairs that may refer to a resource to be collected:
a
elementsobject
elementsCreate an EPUB 3.2, ie, an OCF file from the original content
This function is a wrapper around create_epub_from_dom:
Reference to the original document; this may have to be transformed by respec on-the-fly.
Create an OCF instance from DOM representing the original content.
All the resource entries are first collected in the in a Global.resources array, to be then added to the
package.opf
file as well as to download
the resources into the final epub result (see the last two steps above).
The url of the document (serves also as a base for all the other resources)
The DOM of the final format of the document (i.e., the original document may have gone through a respec processing...)
Create the final epub file (ie, an OCF instance): download all resources, if applicable, add them all, as well as the generated content (package file, nav file, the original content file, etc.) to an OCF instance.
The generated epub file name is shortName.epub
.
Collect the references to the extra resources, to be added to the EPUB file as well as the package opf file. It relies on searching through the HTML source file, based on the query patterns given in resource_references.
The media type of all entries are established by issuing a HEAD request to the respective resource.
Main Processing class
Main processing steps for the creation of EPUB files. See the create_epub and create_epub_from_dom entry points for the details.
On a high level, the task of creating the EPUB file consists of:
https://www.w3.org/StyleSheet/TR/2016/*
; these style files, and the related images, depend on the exact nature of the TR document: REC, WD, etc. All these should be collected/created as resources for the EPUB file. (See the “css” module.)display:none
), extract that HTML fragment and put it into a separatenav
file, per EPUB3 specification. (See the “nav” module.)