[sword-devel] The usefulness of gen book modules

Troy A. Griffitts scribe at crosswire.org
Wed Sep 26 02:58:36 MST 2007


Dear Don,

I have missed you!  It's good to hear your suggestions.  Although this 
sounds like something that would be a dominant feature presented to the 
user, it is not one that we have a specialized interface in the engine 
to handle.

Having said that, it can be done fairly effectively doing the following. 
  We'll use the DBD daily devotional as an example, but any module 
(including genbooks) should work the same.

1) Make sure the module has an appropriate filter for Scripture 
References in the .conf file.  We'll need to add this line to dbd.conf:

LocalOptionFilter=ThMLScripref

2) Use the following search call to the engine.  To demonstrate, we'll 
slightly modify our sword/examples/cmdline/search.cpp example to change 
the search type to use Entry Attributes search type.

listkey = target->Search(searchTerm.c_str(), -3, REG_ICASE, 0, 0, 
&percentUpdate, &lineLen);

(NOTE: the -3 specifying Entry Attribute Search)

3) Then verse references can be searched using the Entry Attribute path: 
Footnote//refList/<YOUR REF HERE>/

e.g. using our modified sword/examples/cmdline/search tool, we could 
execute the line:

./search DBD "Footnote//refList/Hebrews 13/"

and you will get a list of each day DBD devotional references Hebrews 13.

Now, ultimately:
I) all our modules should be updated to have the appropriate filters.
II) non-OSIS Scripture reference filters (like ThMLScripref) should run 
the verse list through our SWORD parser and spit out OSIS references in 
the refList field so all references will be uniform.
III) ULTIMATELY frontends would add a nice little dialog box to execute 
the call referenced above.
IV) We could add a lucene index for Footnote//refList so the results 
would come back very fast.


Thank you for the suggestion Don!

	-Troy.






Don A. Elbourne Jr. wrote:
> Does Sword index scripture references in gen books?
> 
> In other words, does the Sword engine provide the possibility of 
> creating some sort of "passage study" tool? For example a user could 
> submit a particular passage, like Eph 2:8-9. The query would return a 
> list of links to citations in gen books where the scripture reference 
> exists.
> 
> I am not necessarily making a feature request (although this feature 
> would be very cool - so please do not flame me) I'm just wondering if 
> the possibility exists. If so, I would be more willing to help convert  
> classic Systematic theologies, historic creeds, and puritan sermons into 
> Sword module format. then I could wait until someone wants to build it 
> into a front end. Without this feature, it doesn't seem that gen book 
> modules afford much usefulness.
> 
> Having something like this would serve me well in sermon preparation. If 
> I'm preaching a particular passage, I'd love to have the ability to 
> search my gen book collection for any citation of that passage.
> 




More information about the sword-devel mailing list