View Single Post
Old 07-10-2014, 09:35 AM   #885
tkeo
Connoisseur
tkeo began at the beginning.
 
Posts: 94
Karma: 10
Join Date: Feb 2014
Location: Japan
Device: Kindle PaperWhite, Kobo Aura HD
Hi Kevin,
Quote:
Originally Posted by KevinH View Post
A) Add spine_pagelinear={} to go with the spine_pageprops

or

B) We combine both linear and properties into one spine_pageattributes dictionary that holds all attributes of that itemref in the spine in its own dictionary.

or

C) we treat spine_pageprops as a dictionary holding a list [linear, properties]

Since you are more up to date on what can appear here, are their any other page attributes of the itemref besides "linear" and "properties" or are they the only ones that exist?

If there are others I say we go with option B as it is more general. If linear and properties are the only ones that exist we can use options A or B your choice.

Just let me know which one you prefer or simply modify mobi_k8resc.py to do what you need.
I have never seem but id attribute might in an itemref tag.
http://www.idpf.org/epub/301/spec/ep...c-itemref-elem

Besides, it makes simpler to generate itemref tags in mobi_opf.py.
So, I prefer to go with B).

As for properties, it is allowed to have more than two values, ex.
Code:
<itemref idref="titlepage" properties="page-spread-right rendition:layout-pre-paginated"/>
This is just note. We can store it as a string in a dict.

I have modified to change from spine_pageprops and spine_linear to spine_pageattributes, prepending 'x_' to cover_name and id attribute.

A little bit irregular way though, I have also modified to insert cover page in the case RESC is not exist nor spine is not in the RESC.
Please see attached patch.

Thanks,
Attached Files
File Type: txt patch.txt (7.3 KB, 229 views)
tkeo is offline   Reply With Quote