[sword-devel] Getting text without tags

Troy A. Griffitts scribe at crosswire.org
Sat Dec 2 12:50:15 MST 2006


Jari,
	Could you post a little more detail.

	What module are you using?
	Could you post the exact code snippet you are using and the output from it?

Some other suggestions:

Have a look in the module's .conf file and see what OptionFilter= 
entries are present.  You can find these filters along with their key 
string under src/modules/filters/

I've added a new example in examples/cmdline/ which shows how to get a 
list of all options you can set and what values they each take.  This 
list is built based upon what books are in your library and what options 
they've registered with the engine, so it may display different data for 
different library sets.

https://crosswire.org/svn/sword/trunk/examples/cmdline/listoptions.cpp

These questions are great opportunities for us to improve our examples; 
please keep asking!  I hope these are helpful.

	-Troy.



Jari Strand wrote:
> I don't know what's wrong but the strongs are still displayed. Perhaps the 
> key string is something else than "Strong's Numbers" ?
> 
> Thanks though!
> 
>> From: "Troy A. Griffitts" <scribe at crosswire.org>
>> Reply-To: SWORD Developers' Collaboration Forum <sword-devel at crosswire.org>
>> To: SWORD Developers' Collaboration Forum <sword-devel at crosswire.org>
>> Subject: Re: [sword-devel] Getting text without tags
>> Date: Fri, 1 Dec 2006 16:42:12 -0700
>>
>> Jari,
>>   You shouldn't have to add any filters yourself for such an easy task.  
>> You
>> should merely be able to:
>>
>> SWMgr library;
>> SWModule *book = library.getModule("KJV");
>> book.setKey("jn.3.13");
>> cout << book.StripText();
>>
>> There are a number of options which you may or may not want to show up in
>> your text, like footnotes, strongs number, etc.  These can be turned on and
>> off with something like:
>>
>> library.setGlobalOption("Strong's Numbers", "Off");
>>
>>
>> Hope this helps.
>>   -Troy.
>>
>>
>>
>> Jari Strand <strand_jari at hotmail.com> wrote:
>>> Thanks but that seems to return the text with some additional reference
>>> numbers (strong?).
>>>
>>>
>>>> From: Joachim Ansorg <nospam+sword-devel at joachim-ansorg.de>
>>>> Reply-To: SWORD Developers' Collaboration Forum
>>> <sword-devel at crosswire.org>
>>>> To: SWORD Developers' Collaboration Forum <sword-devel at crosswire.org>
>>>> Subject: Re: [sword-devel] Getting text without tags
>>>> Date: Fri, 1 Dec 2006 20:27:51 +0200
>>>>
>>>> Hi,
>>>> I think there is SWModule::StripText() to get the text without any
>>> markup.
>>>> Joachim
>>>>
>>>>> I have been trying to figure how to print just plain text in the
>>> console
>>>>> window. I have tried calling the RenderText() from SWModule among
>>> other
>>>>> methods but they all seem to give the string with the tags. The only
>>>> change
>>>> --
>>>> <>< Re: deemed
>>>> www.bibletime.info
>>>>
>>>> _______________________________________________
>>>> sword-devel mailing list: sword-devel at crosswire.org
>>>> http://www.crosswire.org/mailman/listinfo/sword-devel
>>>> Instructions to unsubscribe/change your settings at above page
>>> _________________________________________________________________
>>> FREE pop-up blocking with the new MSN Toolbar - get it now!
>>> http://toolbar.msn.click-url.com/go/onm00200415ave/direct/01/
>>>
>>>
>>> _______________________________________________
>>> sword-devel mailing list: sword-devel at crosswire.org
>>> http://www.crosswire.org/mailman/listinfo/sword-devel
>>> Instructions to unsubscribe/change your settings at above page
>>>
>>>
>>
>>
>> _______________________________________________
>> sword-devel mailing list: sword-devel at crosswire.org
>> http://www.crosswire.org/mailman/listinfo/sword-devel
>> Instructions to unsubscribe/change your settings at above page
> 
> _________________________________________________________________
> Express yourself instantly with MSN Messenger! Download today it's FREE! 
> http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
> 
> 
> _______________________________________________
> sword-devel mailing list: sword-devel at crosswire.org
> http://www.crosswire.org/mailman/listinfo/sword-devel
> Instructions to unsubscribe/change your settings at above page




More information about the sword-devel mailing list