Consider the following guide section from an OPF file:
Code:
<guide>
<reference type="start" title="Start" href="Text/file1.xhtml"/>
<reference type="toc" title="Table of Contents" href="Text/toc.xhtml"/>
<reference type="thumbimagestandard" title="thumbimagestandard" href="Images/thumb.jpg"/>
<reference type="copyright-page" title="Copyright" href="Text/copy.xhtml"/>
<reference type="cover" title="Cover" href="Text/titlepage.xhtml"/>
</guide>
bk.getguide() would return the following list of tuples:
Code:
[('start', 'Start', 'Text/file1.xhtml'), ('toc', 'Table of Contents', 'Text/toc.xhtml'), ('thumbimagestandard', 'thumbimagestandard', 'Images/thumb.jpg'), ('copyright-page', 'Copyright', 'Text/copy.xhtm'), ('cover', 'Cover', 'Text/titlepage.xhtml')]
If you wanted to programatically remove the thumbimagestandard reference item from the Guide, then you would do so with:
Code:
bk.setguide([('start', 'Start', 'Text/file1.xhtml'), ('toc', 'Table of Contents', 'Text/toc.xhtml'), ('copyright-page', 'Copyright', 'Text/copy.xhtm'), ('cover', 'Cover', 'Text/titlepage.xhtml')])
Each tuple in both (set|get)guide is three-member tuple comprised of (type, title, href).