[sword-devel] Implemented writable interface in RawText
Troy A. Griffitts
Wed, 30 Aug 2000 13:56:00 -0700
Joachim and Module Writers,
Joachim Ansorg wrote:
> Very good news! This was a thought of me to implement something llike the
> following in BibleTime:
> -Create new module (bible, lexicon or commentary) which will be writeable
> (managed by BibleTime)
> -Edit verses etc of the module
Have a look at vpl2mod. This uses a few new functions that I've pushed
back into the API like:
RawText::operator << (const char *); // this one already existed, but is
now implemented in RawText. Now RawText module can be written to with
the same interface as a personal commentary.
This allows easier module creation with all indexing details taken care
of in the API. It is a first step to supporting a GUI based module
> ->This does help us to get user-made modules like commentaries etc. if they
> do it step by step and if they don't want to convert a whole module at once
> this feature is IMHO useful.
> Does somebody like it or find it useful?
> With the new RawText thing it will IMHO be easier.
Yes! Frontends to allow users to create modules and commentaries easily
is a goal for these features.
> > The implementation appends the new entry to the end of the datafile.
> > Lot's of editing will produce a bigger and bigger data file.
> Oh! This is not so good.
> Can't we make it real functional by adding support to write keys somewhere in
> the text? Otherwise lots of things won't work (e.g. console indexer etc.). In
> the worst case the text of Genesis 1:1 is at the end of te module!
:) It's really not all that bad. Consider this: How do you take a
data file that looks like this:
and replace 'Entry 2' with 'Entry Two'? In real time, quickly? The
easiest way was to add the new entry to the end of the data file and
point the index to this location. It really doesn't matter where in the
data file the entry exists (RawText doesn't care, at least). We can add
'clean' method, or something to 'defrag' the database if it becomes
unmanagable, but this will only happen it the user frequently REPLACES
entries. Creating a new module from top to bottom results in a perfect
sequential datafile anyway. This is the method I used in vpl2mod.
> > I'm hoping to add a 'getModifications()' option to this driver that will
> > find appended entries. This will allow us to put in a 'Submit Edits'
> > option in the frontends and allow users to submit changes for modules.
> > I think this will be useful.
> I do not understabd correctly. Something like I mentioned above (writing at
> the real position)?
Well, we have users that don't know how to program, but would love to
help by proofing texts. This allows them to make changes and then
submit them back to us. The frontend could call getModifications() and
pop up an email message with the body of the message listing each
modification with a place for a comment by the user for each, and with
the sender address of the mail to: email@example.com
or something similar.
> > This is one idea that came from dinner with Jerry and Geoff Hastings
> > last week. It was nice to finally meet someone in person from the
> > project. We had a good brainstorming lunch!
> Hey, cool!
> I like dinners and discussing.
> Maybe I'll spend some weeks in USA to learn proper english for school, so
> we'll eat dinner together ;-)
Yes! Please come to America. You can house hop between me and many of
my friends for months! :)