OPFPacDocument¶
The OPF Package Document.
-
class
yael.opfpacdocument.
OPFPacDocument
(internal_path=None, obj=None, string=None)[source]¶ Build the OPF Package Document or parse it from obj or string.
-
bindings
¶ Currently not parsed.
Return type: None
-
collection
¶ Currently not parsed.
Return type: None
-
files_referenced_manifest
¶ The (ordered) list of files referenced in the OPF <manifest>.
Each file is represented by its path, relative to the Container root.
Return type: list of str
-
files_referenced_spine
¶ The (ordered) list of files referenced in the OPF <spine>.
Each file is represented by its path, relative to the Container root.
Return type: list of str
-
files_referenced_spine_linear
¶ The (ordered) list of files referenced in the OPF <spine> with attribute linear=”yes” or omitted.
Each file is represented by its path, relative to the Container root.
Return type: list of str
-
guide
¶ The list of guide references objects.
Return type: yael.opfguide.OPFGuide
-
internal_path_cover_image
¶ The path of the cover image, relative to the Container root.
Return type: str
The path of the Navigation Document, relative to the Container root.
Return type: str
-
internal_path_ncx_toc
¶ The path of the NCX TOC, relative to the Container root.
Return type: str
-
item_by_internal_path
(internal_path)[source]¶ Return the <item> child with href corresponding to the given internal path.
Parameters: internal_path (str) – the internal path of the desired item Returns: the child with given path, or None if not found Return type: yael.opfitem.OPFItem
-
manifest
¶ The list of manifest item objects.
Return type: yael.opfmanifest.OPFManifest
-
metadata
¶ The list of metadatum objects.
Return type: yael.opfmetadata.OPFMetadata
-
relative_path_cover_image
¶ The path of the cover image, relative to this Package Document.
Return type: str
The path of the Navigation Document, relative to this Package Document.
Return type: str
-
relative_path_ncx_toc
¶ The path of the NCX TOC, relative to this Package Document.
Return type: str
-
relative_to_internal
(path)[source]¶ Resolve the given path (relative to this Package Document), into an internal path (relative to the Container root).
Parameters: path (str) – the relative path (relative to OPF) Returns: the internal path (relative to Container root) Return type: str
-
spine
¶ The list of spine itemref objects.
Return type: yael.opfspine.OPFSpine
-
spine_index_by_internal_path
(internal_path)[source]¶ Return the index in the spine of the file located at the given internal path (relative to the Container root).
Parameters: internal_path (str) – the internal path of the desired item Returns: the index in the spine, or -1 if not found Return type: int
-
spine_linear_index_by_internal_path
(internal_path)[source]¶ Return the index in the linear spine of the file located at the given internal path (relative to the Container root).
Parameters: internal_path (str) – the internal path of the desired item Returns: the index in the spine, or -1 if not found Return type: int
-
v_dir
¶ The value of the dir attribute.
Return type: str
-
v_id
¶ The value of the id attribute.
Return type: str
-
v_prefix
¶ The value of the prefix attribute.
Return type: str
-
v_version
¶ The value of the version attribute.
Return type: str
-
v_xml_lang
¶ The value of the xml:lang attribute.
Return type: str
-