[sword-devel] Implementing filters with the SWIG bindings
Troy A. Griffitts
scribe at crosswire.org
Fri Feb 17 19:05:33 MST 2006
If you don't have C++ skills, you'll need to pick one of our render
filter sets already made. You can ask the engine to spit out RTF, HTML,
OSIS, ThML, etc... You'll probably want some variant of HTML. I think
we have 3 HTML filter sets out there and available. Here is the
complete list of available values currently:
FMT_PLAIN, FMT_THML, FMT_GBF, FMT_HTML, FMT_HTMLHREF,
FMT_RTF, FMT_OSIS, FMT_WEBIF
HTML, HTMLHREF, and WEBIF are all HTML filter sets. You might find
these useful enough for what you want.
One of these values is passed to SWMgr on construction, usually. I
don't know how the SWIG bindings work, but in C++, this is done like this:
SWMgr mySwordLibrary(new MarkupFilterMgr(FMT_HTMLHREF));
This tells the engine that all rendered output should use the HTMLHREF
The MacSword and Bibletime guys have produced their own HTML render
filter sets, as well, I think, so you might ask them for theirs.
Ultimately, we'd like to have one set of HTML render filters using only
a limited tag set with all style external and marked up with css class
names in the markup. Then the frontends could use their own CSS. The
set we use in swordweb is WEBIF and probably has hooks for the newest
functionality in the engine.
Hope this is helpful.
Matt Reimer wrote:
> Has anyone implemented filters with the SWIG bindings, or know how?
> I'd like to render the NET Bible footnotes in my pygtk Sword viewer,
> but the filter interfaces have no bindings. I spent a bit of time
> trying to do that, to no avail (not enough C++ skillz).
> Thanks in advance,
> sword-devel mailing list: sword-devel at crosswire.org
> Instructions to unsubscribe/change your settings at above page
More information about the sword-devel