[sword-devel] Remove Strong's references from KJV module
Loren Burkholder
computersemiexpert at outlook.com
Sun Nov 15 08:29:49 EST 2020
That does make sense. Thanks for the explanation.
________________________________
From: sword-devel <sword-devel-bounces at crosswire.org> on behalf of Troy A. Griffitts <scribe at crosswire.org>
Sent: Sunday, November 15, 2020 12:41:12 AM
To: SWORD Developers' Collaboration Forum <sword-devel at crosswire.org>
Subject: Re: [sword-devel] Remove Strong's references from KJV module
Greg is certainly right, the KJV source markup is OSIS, which you can discover by looking in the module's kjv.conf file. SWORD's typical nomenclature for filters is to start the filter name with the markup source which it is designed to work upon, thus GBFPlain would take GBF source markup and output plain text. As Greg suggests, OSISPlain would take OSIS source markup (what the KJV module uses) and output plain text.
Having said all this, you probably never will need to do any of this manually. SWORD’s factory classes (SWMgr in this instance) should look at the module's .conf file and add all the right filters for you if you tell the engine what "Render" format you'd like. In my previous example, that's done with the line:
SWMgr library(new MarkupFilterMgr(FMT_PLAIN));
This says, render PLAIN text. You could just as easily say here render RTF, LATEX, XHTML, or any of a number of others (see FMT_* in swmodule.h)
Hope this explains a bit of how things generally flow.
Troy
On November 14, 2020 8:46:40 PM MST, Greg Hellings <greg.hellings at gmail.com> wrote:
Have you tried OSISPlain? KJV is not in GBF
On Sat, Nov 14, 2020, 21:42 Loren Burkholder <computersemiexpert at outlook.com<mailto:computersemiexpert at outlook.com>> wrote:
I'm trying to get the plain text for a verse from the KJV module, but I can't figure out how to remove the Strong's references. I've tried adding a sword::GBFPlain and sword::GBFStrongs as a strip filter to my KJV module, but it only strips out the beginning of the <w> element, leaving me with stuff like:
> salvm="strong:H072255">In the beginning
as my output, instead of taking out the whole <w salvm="strong:H072255"> tag. What should I be doing to get rid of all this?
Thanks in advance.
Loren Burkholder
_______________________________________________
sword-devel mailing list: sword-devel at crosswire.org<mailto:sword-devel at crosswire.org>
http://crosswire.org/mailman/listinfo/sword-devel
Instructions to unsubscribe/change your settings at above page
--
Sent from my Android device with K-9 Mail. Please excuse my brevity.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://crosswire.org/pipermail/sword-devel/attachments/20201115/3cf9654c/attachment.html>
More information about the sword-devel
mailing list