[sword-devel] STEP modules

Troy A. Griffitts sword-devel@crosswire.org
Mon, 20 Nov 2000 06:37:58 -0700

New STEP utility: step2vpl
It mostly works... mostly. :)


PS. Kevin, comment below...

> I can't answer how SWORD does/will do it, but yes, RTF is "interesting". (like
> what in the world is "hidden-text" for? :-)  I'm presently in the middle of
> doing RTF for myself and am having some success.  Now if I only had more
> time... :-)  I've got about 25 RTF commands working, and have identified 34
> more to do, plus 6 STEP commands to implement.

Well, we either need to build a 'filter' object to convert RTF+STEP to
every frontend markup that we want to support (currently how our engine
works), or to an 'intermediate' markup-- probably ThML-- and let each
frontend build a ThMLToWhateverTheirFrontendNeeds Filter.

This will be our new 2 phase Filter architecture.

> At this time, I think I will continue on my own; just so you know, as I said I
> would get back to you about that.  However, I'll offer a hand by attempting to
> answer any questions about STEP that I can (I have limited knowledge, but am
> learning it the hard way. :-)  Also, while I realize I'm doing this in Perl
> and not C++, I am willing to share any code you might like to see.  If you
> feel like "borrowing", I'm willing to "lend".  I'll probably put a copy on my
> web page soon.  If you care to be kept informed, let me know and I'll shoot an
> email out; or I can email you a tarball of the code.

Yes, I'd love to see how you handle some of the quirks that I've run up

The docs just flat out aren't correct, from what I've seen.  But for the
most part they aren't too hard to follow (which I suppose is good.  At
least I can QUICKLY get to where I know the docs are slightly wrong) :)

> For the curious, I can tell you about book.dat, section.idx, viewable.idx; how
> they work, how to use them, etc., if the STEP docs aren't clear.  I can
> provide working code (again in Perl, but it's generally obvious how it works
> as it's much like C/C++).  For those that have seen QuickVerse 6, I've got the
> GUI up with the section index on the left, and the text reader on the right.
> If you click on a section entry, the reader will display the "text blocks" in
> the reader:  raw (for debugging) and translated (the final output that is
> getting better).  I've been working on "My Utmost for His Highest" as it's
> reasonably short; but occassionally bring up a NASB or NKJV for fun.  I have
> adopted a scheme of reading a whole book into memory at once and displaying
> that.  For the NT, it works reasonably well, but woe unto me if I pull up
> Psalms! (I took ~1m15s to load & translate & display :-)  I thought I'd point
> that out in case you do or are thinking of doing that.  I will probably have
> to change my ways... (I can now see why QV6 does it only 1 chapter at a
> time... Hmmm...maybe I should do 1 chapter at a time with a cache of 25 on a
> LRU scheme?  but then some chapter breaks are bad and a person needs to see 2
> chapters at once... decisions, decisions :-)

Yes.  Our engine treats Bibles are verse granular repositories.  It will
be interesting to see how tough it is to get a STEP Bible to display the
same as our other modules.  We will probably then also have a special
'STEP view' that will show for module formatted in its 'STEP Viewable
chunk' granularity also.

> > OR....  If you know anything about the Bible reference lookup indexing
> > of a STEP Bible module, let's work together on that.
> Do you mean how \steplink works?  I haven't gotten that far yet; but I believe
> I remember reading about it in the docs (big help huh? :-).  I'll probably get
> to that in a couple of weeks.  If you mean something else, let me know in
> more/different detail and I'll try to answer.  (but if your question means
> what I think it does, you'll need the bible-book-number to bible-book-name
> table listed on pages 46-49 in the v1.1 STEP doc)

I've read the 'preview of 2.0' section on the BSISG site and it doesn't
give me any good technical information about how to treat Bibles
differently than any other module.  What our engine really needs the
ability to do is to, eg. GetTheTextFor("James 1:19").  This is not a
trivial task unless there is something special they do to tell me the
OFFSET into the viewable chunk for the verse, and the LENGTH of the

the free NKJV STEP module that Parsons has on their site
(ftp://download.parsonstech.com/demos/qnkjo.exe) has the Vsync.idx index
referencing every verse in the Bible (or as far as I can tell).  I used
this index for the step2vpl utility.  It seems to end prematurely in
Rev., though.  Maybe my loops are off...

Well, glad we're both making progress.  I'm excited to see what you
have!  I have no interest in making a step module writer!  I'm glad you

	In Christ,

PS.  I've been forwarding your messages to our list.  There have been
some comments on the subject there.  We'd love to have you and the
traffic is usually pretty min. (mailto:majordomo@crosswire.org with the
body: subscribe sword-devel).