[sword-devel] Efficiently extracting section + chapter headers

Tobias Klein contact at tklein.info
Mon Apr 12 12:31:12 EDT 2021


Hi,

I have been getting a request from a user to render section headings independently of the currently opened bible translation module.

So for example when opening the KJV still using the section/chapter headers of the NASB.

This would be useful in those cases when the respective bible translation module does not come with section/chapter headers, but another one does.

A requirement would be to efficiently extract section/chapter headers from a module using the SWORD API. As of now I only see that you can iterate over the verses of a book and individually scan each verse for the headers. Is there a more efficient way of doing that?

Another use case could be to render a book outline. This is what I am already doing now in Ezra, but in a way that is not so clean (I am traversing the DOM looking for all section header elements of the current book).

Best regards,
Tobias


More information about the sword-devel mailing list