<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Hi Loren,<div class=""><br class=""></div><div class="">This is how I’m doing it in node-sword-interface.</div><div class=""><br class=""></div><div class="">1) Getting the list of books in a module</div><div class=""><br class=""></div><div class=""><span style="color: rgb(36, 41, 46); font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace; font-variant-ligatures: normal; orphans: 2; white-space: pre; widows: 2; background-color: rgb(255, 255, 255);" class="">vector<string> </span><span class="pl-en" style="box-sizing: border-box; color: rgb(111, 66, 193); font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace; font-variant-ligatures: normal; orphans: 2; white-space: pre; widows: 2; background-color: rgb(255, 255, 255);">ModuleHelper::getBookList</span><span style="color: rgb(36, 41, 46); font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace; font-variant-ligatures: normal; orphans: 2; white-space: pre; widows: 2; background-color: rgb(255, 255, 255);" class="">(string moduleName)</span></div><div class=""><a href="https://github.com/ezra-project/node-sword-interface/blob/master/src/sword_backend/module_helper.cpp#L70" class="">https://github.com/ezra-project/node-sword-interface/blob/master/src/sword_backend/module_helper.cpp#L70</a></div><div class=""><br class=""></div><div class="">2) Getting a map with the number of verses per chapter per book</div><div class=""><br class=""></div><div class=""><span style="color: rgb(36, 41, 46); font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace; font-variant-ligatures: normal; orphans: 2; white-space: pre; widows: 2; background-color: rgb(255, 255, 255);" class="">std::map<std::string, std::vector<</span><span class="pl-k" style="box-sizing: border-box; color: rgb(215, 58, 73); font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace; font-variant-ligatures: normal; orphans: 2; white-space: pre; widows: 2; background-color: rgb(255, 255, 255);">int</span><span style="color: rgb(36, 41, 46); font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace; font-variant-ligatures: normal; orphans: 2; white-space: pre; widows: 2; background-color: rgb(255, 255, 255);" class="">>> </span><span class="pl-en" style="box-sizing: border-box; color: rgb(111, 66, 193); font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace; font-variant-ligatures: normal; orphans: 2; white-space: pre; widows: 2; background-color: rgb(255, 255, 255);">getBibleChapterVerseCounts</span><span style="color: rgb(36, 41, 46); font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace; font-variant-ligatures: normal; orphans: 2; white-space: pre; widows: 2; background-color: rgb(255, 255, 255);" class="">(std::string moduleName);</span></div><div class=""><div><a href="https://github.com/ezra-project/node-sword-interface/blob/master/src/sword_backend/module_helper.cpp#L92" class="">https://github.com/ezra-project/node-sword-interface/blob/master/src/sword_backend/module_helper.cpp#L92</a></div><div><br class=""></div><div>Best regards,</div><div>Tobias<br class=""><br class=""><br class=""><blockquote type="cite" class=""><div class="">Am 17.11.2020 um 04:43 schrieb Loren Burkholder <<a href="mailto:computersemiexpert@outlook.com" class="">computersemiexpert@outlook.com</a>>:</div><br class="Apple-interchange-newline"><div class=""><div class="">I was digging into the docs and found that a VerseKey can give some info about the book and chapter that it is in, and the numbers of books and chapters. This could be useful to me because I want to get a list of the books in a module, then load the number of chapters for the book and the number of verses for the selected chapter on-demand. However, I'm not completely sure how I should be doing this. Would the following pseudo-code be appropriate, or is there a different method that I should be using?<br class=""><br class="">m_books = someVar; // what should this do?<br class="">key.setBook(m_books.currentIndex());<br class="">m_chapters = key.getChapterMax();<br class="">m_verses = key.getVerseMax();<br class="">setCurrentRef(m_books[index], m_chapters[index], m_verses[index]);<br class=""><br class="">I know that this isn't great pseudo code but it's what I came up with.<br class=""><br class="">Thanks,<br class="">Loren<br class=""><br class=""><br class="">_______________________________________________<br class="">sword-devel mailing list: <a href="mailto:sword-devel@crosswire.org" class="">sword-devel@crosswire.org</a><br class=""><a href="http://crosswire.org/mailman/listinfo/sword-devel" class="">http://crosswire.org/mailman/listinfo/sword-devel</a><br class="">Instructions to unsubscribe/change your settings at above page<br class=""></div></div></blockquote></div><br class=""></div></body></html>