arguments needed to create the chapter’s OCF.
whether this is the first chapter in the book. Necessary, for example, to transfer the items listed in transfer_once for a book.
The chapter’s name as a string.
The date of the chapter as a string.
The list of editors as an array of strings.
Is this the first chapter?
The chapter’s identifier as a string.
The chapter’s name as a string.
The (HTML source) of the navigation file as a string.
The list of non-linear spine items as an array of strings (ie, the idref values), necessary to build the new OPF content.
The list of minimal manifest item information as an array of OPFManifestItem instances, necessary to build the new OPF content.
The chapter’s title as a string.
Conforms to WCAG Level A
Convert the Overview.xhtml file by converting the possible mutual references to other chapters
The real initialization must be done in a separate method and not in the constructor, because async actions are (heavily) involved...
The method starts by running r2epub on the original arguments, and the uses the jszip methods (see the jszip documentation) to extract the content.
The following items are extracted, and stored, from the chapter’s OCF:
this
for an easier management on the caller side.Internal function: the name of the manifest item must be altered when stored in the final book to avoid clashes
the original name in the chapter
Store all the manifest items in the book, represented by its target OCF. This is based on the list collected in initialize.
the target publication
Wrapper around a single chapter. The main action is in the initialize method, which collects all the data and extracts additional data that are necessary elsewhere.