[sword-devel] DisplayLevel handling

Jonathan Morgan jonmmorgan at gmail.com
Fri Jun 19 07:27:20 MST 2015


Hi Karl,

BPBible has some level of support for it (look for display_level in
https://code.google.com/p/bpbible/source/browse/trunk/backend/genbook.py).
Looks like it tries to find the first and last key that should be included.
I didn't write it, and I don't know whether it still works or whether there
are any modules that actually use it.

Jon

On Fri, Jun 19, 2015 at 9:05 PM, Karl Kleinpaste <karl at kleinpaste.org>
wrote:

>  Xiphos has never handled DisplayLevel in any way.  I've looked at the
> wiki write-a-conf page and I'm kind of at a loss to grasp what would happen
> for DL > 2.  DL=1, just display the entry, fine. DL=2, display all siblings
> at the same key level, fine.  DL>=3?  Do I start crawling up and down the
> key tree looking for stuff?  It doesn't seem to me that DL>2 makes a whole
> lot of practical sense.
>
> Does anyone have some code at hand that they could share, for handling the
> DL=2 case?  Basically, given a key /a/b/c, loop through all /a/b/*.  Just
> trim the key back to /a/b, then...what?  I understand DL=2 is what must
> have been intended in the brief, abortive foray into genbook Bibles some
> years ago, so asking for Matthew/25/1 would show all of Matthew/25, but
> that effort clearly fell flat.
>
> I've always been uncomfortable with Xiphos' handling of genbook keys.  I
> could use a short tutorial in code.
>
> _______________________________________________
> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.crosswire.org/pipermail/sword-devel/attachments/20150620/a33bd7bf/attachment-0001.html>


More information about the sword-devel mailing list