OPFManifest

The OPF <manifest> element.

class yael.opfmanifest.OPFManifest(internal_path=None, obj=None, string=None)[source]

Build the OPF <manifest> element or parse it from obj or string.

add_item(item)[source]

Add the given <item> to the manifest.

Parameters:item (yael.opfitem.OPFItem) – the <item> to be added
audio_items

The list of items with media-type associated with audio formats.

Return type:list of yael.opfitem.OPFItem objects
content_document_items

The list of items corresponding to Content Documents.

Return type:list of yael.opfitem.OPFItem objects
cover_image_item

The item with property cover-image.

Return type:yael.opfitem.OPFItem
font_items

The list of items with media-type associated with font formats.

Return type:list of yael.opfitem.OPFItem objects
image_items

The list of items with media-type associated with image formats.

Return type:list of yael.opfitem.OPFItem objects
item_by_id(v_id)[source]

Return the <item> child with given id.

Parameters:v_id (str) – the desired id
Returns:the child with given id, or None if not found
Return type:yael.opfitem.OPFItem
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
items

The list of <item> objects in this manifest.

Return type:list of yael.opfitem.OPFItem objects
items_by_media_type(v_media_type)[source]

Return the <item> child with given media-type.

Parameters:v_media_type (str) – the desired media-type
Returns:the child with given media-type, or None if not found
Return type:yael.opfitem.OPFItem
mathml_items

The list of items with MathML elements.

Return type:list of yael.opfitem.OPFItem objects
mo_document_items

The list of items corresponding to Media Overlay Documents (SMIL).

Return type:list of yael.opfitem.OPFItem objects
mo_items

The list of items with Media Overlays.

Return type:list of yael.opfitem.OPFItem objects
nav_document_item

The item with property nav.

Return type:yael.opfitem.OPFItem
scripted_items

The list of items corresponding to Scripted Documents.

Return type:list of yael.opfitem.OPFItem objects
smil_items

The list of items corresponding to Media Overlay Documents (SMIL).

Return type:list of yael.opfitem.OPFItem objects
svg_items

The list of items with SVG elements.

Return type:list of yael.opfitem.OPFItem objects
v_id

The value of the id attribute.

Return type:str
video_items

The list of items with media-type associated with video formats.

Return type:list of yael.opfitem.OPFItem objects