[sword-devel] module making questions

Chris Little sword-devel@crosswire.org
Mon, 9 Oct 2000 16:35:00 -0700 (PDT)

I've got a couple questions about making new modules.  Maybe only Troy
will know the answers, but I figured other list readers might benefit....

Background: I have a modified (actually gutted) version of vpl2mod.cpp,
now named addvs.cpp.  The syntax is: addvs </path/to/module> <book
chapter:verse> </path/to/file/containing/verse/text>.  So basically, it
will add the full text of some file to a given verse in a given
module.  It's intended purpose is to be called by a perl script that
parses another file and hands it portions of text, though I suppose it
could also be used for correcting a single verse by hand in a pre-existing
module.  I originally had it take input from stdin.  That worked poorly
for my purposes, but I'll re-add that functionality for doing corrections,
or I'll just finish the implementation already skeletoned in vpl2mod for
reading the verse reference and placing in the appropriate verse position.

Question 1:  Sometimes I will want to add text to the
module/verse/book/chapter intro entries.  How do I do so?  I thought they
might be chapter/verse 0--like Mat 0:0 might be the intro for the NT or
Gen 1:0 might be the intro to Genesis chapter 1--but none of those seem to
be the case from my experiments.  Is there a nice way to access them
through the API?

Question 2:  Many lengthy commentaries have a single entry to discuss
multiple verses, so the .vss entries for the verses contain the same
(long)offset, (short)size struct.  Is there a method for copying these, or
just reading/writing them, through the API?

If you can help me solve these two problems, I promise I'll not only
contribute the utilities back to the CVS, but I'll deliver MHC
(complete) and Calvin's Commentaries by the end of the week. :)