[sword-devel] General Book Support

Troy A. Griffitts sword-devel@crosswire.org
Thu, 24 Jan 2002 02:20:32 -0700

Me and Chris are out here in Dallas at Wycliffe and have had some time
to work together.  TreeKey and general book support are now checked in
to cvs.  Try them out and let me know what you think.

There are test tools in the tests directory.  There is a genbooktest.cpp
that should be of interest.  Try something like:

cd sword/tests
mkdir yoyo
./genbooktest ./yoyo/mybook

The ? will give you a small menu of some stuff to try.  You should be
able to build a tree index and add and view text on your new book.  The
driver for the .conf file (when you finish and would like to check it
out with swmgr) is RawGenBook

The iteration of the tree is a little different in a few points.  look
at the printTree method in the test program to see.

There is also a treeidxtest program.  It was done first and tests the
TreeKeyIdx implementation of the TreeKey interface (which general book
support uses).  It may be useful to see how to use TreeKeyIdx by
itself.  Many (maybe all) functions in this program are also present in
genbooktest, so refer the genbooktest for the latest version of each
function;  I'll probably back-copy them when I'm not so sleepy.  

TreeKey allows for _USER DATA_ to be stored with each key entry.  We use
this to store the offset and size of the book entry in the rawgenbook
driver.  We can also use this for all kinds of other things.  One
possible thought is for bookmark data.

NOTE: new files are not added to new autoconf / automake system yet. 
You will need to use the old make system to build.  Maybe Daniel can get
them in sometime soon (hint hint, DANIEL GLASSEY, read this) :)

Hope you all enjoy it.  Please keep our meetings in prayer over the next
couple days.  OSIS will be a great tool for us, Lord willing, if we do
it right!