<html><head></head><body> <div>Brilliant!<caret></caret></div><div><br></div><div id="protonmail_mobile_signature_block"><div>Sent from ProtonMail for iOS</div></div> <div><br></div><div><br></div>On Mon, Apr 12, 2021 at 20:07, Troy A. Griffitts <<a href="mailto:scribe@crosswire.org" class="">scribe@crosswire.org</a>> wrote:<blockquote class="protonmail_quote" type="cite"> Sure Tobias,<br><br>module->getEntryAttributes() will allow you to pull the headings from a<br>verse, and<br><br>an Entry Attributes search for '/Heading' will give you only the verses<br>with Heading entries attributes.<br><br>I've thrown together a quick example here, which you can use with<br>something like:<br><br>./showHeadings NASB Matt-John<br><br>which will give you the headings from the Gospels.<br><br>https://crosswire.org/svn/sword/trunk/examples/tasks/findHeadings.cpp<br><br>Creating this example, I found I needed to fix a bug in the engine. The<br>engine Entry Attributes search lets you search for values in the entry<br>attributes (e.g., a Strong's number 1234). In your use case, when<br>searching, you don't care about the value; you only care about<br>presence. This wasn't working, but simple presence can now be searched<br>for with my latest commit.<br><br>Hope this helps,<br><br>Troy<br><br><br>On 4/12/21 9:31 AM, Tobias Klein wrote:<br>> Hi,<br>><br>> I have been getting a request from a user to render section headings independently of the currently opened bible translation module.<br>><br>> So for example when opening the KJV still using the section/chapter headers of the NASB.<br>><br>> This would be useful in those cases when the respective bible translation module does not come with section/chapter headers, but another one does.<br>><br>> 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?<br>><br>> 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).<br>><br>> Best regards,<br>> Tobias<br>> _______________________________________________<br>> sword-devel mailing list: sword-devel@crosswire.org<br>> http://crosswire.org/mailman/listinfo/sword-devel<br>> Instructions to unsubscribe/change your settings at above page<br>_______________________________________________<br>sword-devel mailing list: sword-devel@crosswire.org<br>http://crosswire.org/mailman/listinfo/sword-devel<br>Instructions to unsubscribe/change your settings at above page</blockquote><div><br></div><div><br></div></body></html>