[sword-devel] Sword-Perl 0.3

Joachim Ansorg sword-devel@crosswire.org
Thu, 26 Jul 2001 19:32:52 +0200


Hi!

I think you're duplicating work :)
Get BibleTime 1.x and have a look into the backend/sword_backend directory. 

We have methods for next book etc. already implemented there.
It's also a good example how to use filters (see class CSwordBackend for 
this).
I hope this helps.
But beware, the backend isn't perfect.

In Sword's CVS is also a API documentation created by doxygen 
(docs/api-documentation/html/index.html).
I hope this helps you, too.

Joachim

> UTF modules aren't yet handled.  I'll try and get that into the next
> release (probably more like this weekend--lots of work to do this week).
> Other stuff I'm planning is other search methods (right now it's exact
> by default and I don't even think that's a good default) and a few new
> methods (next_chapter, next_book) and some of the changes suggested by
> the good Troy Griffits as to how to use the Sword API more effectively.
>
> I'm considering parsing out some of the remaining <CM>'s and other crud
>
> >from the text ... is there a list of these tags and their meanings
>
> somewhere?  It's be neat to be able to parse them in suhc a way that the
> page actually looks better.  I have seen <CM> and <FI> somewhere, and I
> swear I saw some tags at one point that seemed to indicate references.
>
> Also, how do you actually add a filter properly?  What do the different
> filter levels (Raw, Strip, Render, Option) actually mean, and which
> filters can you put where?  I was trying to turn Strong's numbers on
> earlier, but it didn't seem to have any affect no matter where I added
> the filter.  I created a new GBFStrongs and setOptionValue("on"), and
> then tried adding it to my SWModule using several methods.  I think I
> tried AddOptionFilter and then AddStripFilter (after I read the filter
> docs paragraph in the API primer).
>
> Just as relevantly, where should I add the UTF8 filter?
>
> Thanks!
>
> --John
>
> On 24 Jul 2001 14:26:37 -0700, Chris Little wrote:
> > > BTW, how are Unicode modules managed?
> >
> > If this hasn't already been dealt with, I would convert all non-UTF-8
> > text to UTF-8 using the Latin1UTF8 filter.  The biggest reason for my
> > suggesting this, aside from uniformity of encoding, is that Perl 5.6+
> > uses UTF-8 internally for all strings.
> >
> > --Chris