DM Smith wrote:
I'm not familiar with Sword's filters. Can someone give a quick overview? When the Sword API reads text, does it filter it from its internal format (e.g. ThML, GBF) into a consistent one (e.g. OSIS)? or is it more than one? If so which? And then render that into the delivery image?

I would say that it depends on the front-end. We have one-to-one filters mapping form each of the source formats (OSIS, GBF, ThML, & plaintext) to each of the output and source formats (RTF, HTML, HTMLHREF, ThML, GBF, plaintext, & OSIS). (Plus encoding filters to map from Codepage 1252, UTF-8, and (maybe) SCSU to UTF-8, RTF's Unicode, & UTF-16. And option filters for stripping Strong's, morphology, etc.)

BibleCS uses a direct source-to-render path. So OSIS, GBF, & ThML modules are each processed in their native format, then converted to RTF. But I think I've written some small apps (maybe diatheke works this way, but I'm pretty sure Asenath does) that first convert to a common format (e.g. OSIS), then process the OSIS further.

Coverting everything to OSIS (either in the module itself or at runtime) is probably the way of the future, but who knows when the future is.

I think it would be good to have it be an api feature of Sword. What's the possibility of getting it into the Sword API? (I know we are all busy and I am not a C++ coder anymore. It's been too long.)

There's a little complexity in that wdiff is a frontend to diff. (It literally runs an instance of whatever version of diff is in the path and processes its output.) So we would need to incorporate both wdiff and diff, changing the stdio piping to something that can be handled internally. There might be some complication if the code itself is especially old (or old in style) C. But this should all be pretty easily handled.

There's one other issue, but I'll cover that in another email....

--Chris

_______________________________________________
sword-devel mailing list: sword-devel@crosswire.org
http://www.crosswire.org/mailman/listinfo/sword-devel
Instructions to unsubscribe/change your settings at above page

Reply via email to