[sword-devel] How to detect books available in a given module ?

Troy A. Griffitts scribe at crosswire.org
Tue May 15 18:46:42 MST 2018


Sorry, typo:

give you what you'd like.  If you need to check if any data at all is
- present at any entry in the verse, have a look at:
+ present at any entry in the book, have a look at:


On 05/15/2018 06:44 PM, Troy A. Griffitts wrote:
> Hi Pierre,
>
> We have an example to list the available books within a module.  I have
> just added a check to be sure an entry exists at verse 1:1 of the book
> before printing the book name, so the output will only show books with
> data.  It is possible a module might skip 1:1 for some book, like a
> commentary which doesn't have an entry for 1:1, but this will mostly
> give you what you'd like.  If you need to check if any data at all is
> present at any entry in the verse, have a look at:
>
> SWModule::skipConsecutiveLinks(true) and increment().  This will take
> you to the next entry in the module.  If it is past the current book,
> then you know no entry is present at all in the book.
>
> http://crosswire.org/svn/sword/trunk/examples/tasks/listbiblebooknames.cpp
>
> Hope this is helpful
>
> Troy
>
>
> On 05/15/2018 12:27 PM, Pierre Amadio wrote:
>> On 15/05/2018 21:08, David Haslam wrote:
>>> Hi Pierre,
>>>
>>> The reason that emptyvss OSHB gives no output is simple.
>>>
>>> In this module, every verse specified for "Versification=MT" has some text.
>>>
>>> Refer to https://wiki.crosswire.org/Alternate_Versification
>> Thanks a lot ! That is also something I realised was not working as I
>> expected: comparing some verse from one module to another one gave some
>> discrepancy as if there was an offset in the versification. Now I
>> understand where it comes from :-)
>>
>> _______________________________________________
>> sword-devel mailing list: sword-devel at crosswire.org
>> http://www.crosswire.org/mailman/listinfo/sword-devel
>> Instructions to unsubscribe/change your settings at above page
>
>
> _______________________________________________
> sword-devel mailing list: sword-devel at crosswire.org
> http://www.crosswire.org/mailman/listinfo/sword-devel
> Instructions to unsubscribe/change your settings at above page




More information about the sword-devel mailing list