-
Notifications
You must be signed in to change notification settings - Fork 107
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Please help, how to get chapter title (navLabel) by spineIdref? #186
Comments
I like your idea, but I think that the table of content provided by NCX and/or EPUB3 NavDoc doesn't necessarily give spine-level titles (instead: heading labels), so this does not seem deterministic-enough to allow for a reliable implementation within Readium's core parser. |
@danielweck well, too bad to hear that. I think I may find a way to work around. Thanks for your reply, appreciate it a lot. |
@danielweck sorry to disturb you again. Is there a way to get spine items list before loading a document? Thanks. |
Technically-speaking, I agree that we can establish accurate "relationships" by cross-referencing the TOC and the OPF spine (parsing What I meant was - let's say you have the following OPF spine:
As you can see, the notion of "title" for a given spine item does not necessarily exist, so I don't think you can reliably extract this information from the TOC. In fact the That being said, the TOC of some ebooks do indeed contain a unique textual label (aka "title") for each spine item, so there are definitely cases where this would work :) |
Thank you for the information. I agree that this is not a reliable approach, but with some exception handling, this could work just fine for common usage. As for <title> inside Header, I have also seen many books didn't define it correctly. Maybe it can be used as an alternative. Thank you very much for the help. |
I want to know the chapter title for certain spineIdref, but I don't know how to get it.
I have managed to use the following method to get book TOC information:
But I cannot find the relation between spineIdref and title text as shown in the toc.ncx file:
Please help, I don't know which method should be used for this purpose.
In fact, what I need is something like this:
{
spineIdref:'id1',
href:'balblablbal',
title:'chapter 1',
spineIndex:2
}
Thank you very much.
BTW, if this is impossible using current API, how I can get access to the toc.ncx content so that I can parse it by myself? Thanks
The text was updated successfully, but these errors were encountered: