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

David Haslam dfhdfh at protonmail.com
Tue May 15 12:08:58 MST 2018


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

(Wait until DM has fixed the certificate expiry problem)


​Best regards,

David

Sent with ProtonMail Secure Email.​

‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐

On 15 May 2018 7:47 PM, Pierre Amadio <amadio.pierre at gmail.com> wrote:

> Hello !
> 
> On 15/05/2018 19:30, David Haslam wrote:
> 
> > Hi Pierre,
> > 
> > Aside: It might be useful to outline the context for which you require that data.
> 
> I am trying to build a small qml frontend where a listView used to
> 
> select a book should be populated only with books actually available in
> 
> the current selected module.
> 
> > You might just wish to consider using the Sword utility emptyvss.
> 
> Ahh, i did not know this tool. I do not understand all it does, but I
> 
> guess the important part is where it check if a verse has no length:
> 
> if (!mod->renderText().length())
> 
> I was first using something similar, without checking for a module error
> 
> before rendering the text, but when the module was OSHB (hebrew) and the
> 
> verse key was set to Mark 1.1, I had a content maching "II Chronicles
> 
> 1:1" (instead of nothing).
> 
> Indeed if i run "./emptyvss OSHB" i get no output at all. May be that
> 
> is a bug after all :-)
> 
> Anyway, thanks for the feedback, using both checks (module error and
> 
> verse length, it looks like i can find which book is available or not in
> 
> a given module.
> 
> 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