Gepub.Doc¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
class |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
Properties¶
Name |
Type |
Flags |
Short Description |
---|---|---|---|
r/w |
The current chapter index |
||
r/w/co |
Path to the EPUB document |
Signals¶
- Inherited:
Fields¶
- Inherited:
Class Details¶
- class Gepub.Doc(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
- classmethod new(path)¶
- get_content()¶
- Returns:
the document content
- Return type:
- get_cover()¶
- Returns:
cover file path to retrieve with
Gepub.Doc.get_resource
- Return type:
- get_current()¶
- Returns:
the current chapter data
- Return type:
- get_current_with_epub_uris()¶
- Returns:
the current chapter data, with resource uris renamed so they have the epub:/// prefix and all are relative to the root file
- Return type:
- get_metadata(mdata)¶
- Parameters:
mdata (
str
) – a metadata name string,Gepub.META_TITLE
for example- Returns:
metadata string
- Return type:
- get_resource(path)¶
- Parameters:
path (
str
) – the resource path- Returns:
the resource content
- Return type:
- get_resource_by_id(id)¶
- Parameters:
id (
str
) – the resource id- Returns:
the resource content
- Return type:
- get_resource_mime(path)¶
- get_resource_mime_by_id(id)¶
- get_resource_path(id)¶
- get_resources()¶
- Returns:
doc resource table
- Return type:
- get_text()¶
- Returns:
the list of text in the current chapter.
- Return type:
- get_text_by_id(id)¶
- Parameters:
id (
str
) – the resource id- Returns:
the list of text in the current chapter.
- Return type:
- get_toc()¶
- Returns:
the navigation list in order
- Return type:
- resource_id_to_chapter(id)¶
- Parameters:
id (
str
) – The resource id- Returns:
the chapter index to use with
Gepub.Doc.set_chapter
or -1 if the resource isn’t found- Return type:
This method tries to find the resource by id in the doc spine and will return the index in that list. If the resourse isn’t there this method will return -1.
- resource_uri_to_chapter(uri)¶
- Parameters:
uri (
str
) – The resource path- Returns:
the chapter index to use with
Gepub.Doc.set_chapter
or -1 if the resource isn’t found- Return type:
This method tries to find the resource by path in the doc spine and will return the index in that list. If the resourse isn’t there this method will return -1.
Property Details¶
- Gepub.Doc.props.chapter¶
-
The current chapter index