[sword-devel] Questions about making module from usual book text

DM Smith dmsmith555 at yahoo.com
Sun Oct 15 18:10:34 MST 2006


Troy,

	I think that it might be reasonable to add support for such a  
concept to the Sword engine.

	In JSword we have a notion of a module set which can be subsetted by  
a filter against a field in the conf. The code is pretty simple (see  
http://www.crosswire.org/jsword/java2html/org/crosswire/jsword/book/ 
BookSet.java.html).

	Then in the BibleDesktop GUI we use it as the model for a tree via a  
tree node that knows how to use it to subset. (see http:// 
www.crosswire.org/jsword/java2html/org/crosswire/bibledesktop/book/ 
install/BookNode.java.html) The basic idea is that any node knows its  
depth and its BookSet, and has an array of conf keys that is indexed  
by depth. Again, this code is pretty simple, too.

	While we don't support it yet in BibleDesktop, it would be a fairly  
simple matter to allow for the user to order a list of what is  
important to them from all the single value keys across all the  
modules. In our implementation, if a module does not have a value  
(explicit or default) then it falls into the "Other" bucket.

In Him,
	DM


On Oct 15, 2006, at 8:15 PM, Troy A. Griffitts wrote:

> Dear Сергей,
>
> I'm sorry, but I can't help much with this problem.  The SWORD engine
> doesn't really dictate how a frontend software program should display
> the books in the library.  The engine provides information and the
> frontend is free to present the book however it chooses.  It would be
> cool to have the option to organize books by different criteria, like
> "author", as you have suggested.  We currently don't supply an  
> "author"
> tag in the .conf file.  I wouldn't be against adding such a thing  
> if the
> frontends would use it.  I'm not sure how we would populate the entry
> for most Bibles, but for other books, it would be nice.  If you'd like
> to experiment with code, you can add an entry like:
>
> Author=Bunyan, John
>
> Then in the code you can retrieve the entry with:
>
> SWModule::getConfigEntry("Author");
>
>
> 	Sorry I didn't have better news for you.  Excited to see some of your
> new modules!
>
> 		-Troy.
>
>
>
>   Кузнецов wrote:
>> Dear Troy!
>>
>> Sorry, that I didn't express myself well. I usually use Bibletime,  
>> but sometimes also Gnomesword.
>> In those programs we have categories: Bible, Bookmarks, Books,  
>> Commentaries and so on. In any of those categories we have  
>> subcategories with language, like English,
>> German, Russian, Ukrainian and so on. An then in those language  
>> categories we have actual modules. For example, I have in Books/ 
>> English modules Pilgrim, Josephus, Practice.
>>
>> What I want is to organise the library or bookshelf not by  
>> language, but by author. I managed to do this by changing Lang  
>> in .conf file from "en" to author's name. And now I got
>> new subcategory in Books, and this is Ellen G. White category. But  
>> may be there is better way to do this, because Bibletime  
>> recognized this, but Gnomesword instead of Author's
>> name put 'Unknown'.
>>
>> So the question is more about the way of organizing the library.
>>
>> I hope, now is more clear. I think it concerns more Sword project,  
>> since changes are done through .conf file of the book.
>>
>> Thank you!
>>
>> Serhiy
>>
>>
>> -----Original Message-----
>> From: "Troy A. Griffitts" <scribe at crosswire.org>
>> To: Сергей Кузнецов<sergeyvk at ukr.net>, SWORD  
>> Developers' Collaboration Forum <sword-devel at crosswire.org>
>> Date: Fri, 13 Oct 2006 17:15:50 -0700
>> Subject: Re: [sword-devel] Questions about making module from  
>> usual book text
>>
>>> Dear Сергей,
>>> Glad you got it working!  I am not sure I understand your  
>>> question.  I
>>> think you are probably asking about how a particular sword frontend
>>> presents its sword book library.  What software are you using?
>>>
>>> 	-Troy.
>>>
>>>
>>>> Dear Troy!
>>>> Thank you very much. Finaly with your help and the help of  
>>>> searching archive for october I managed to make sword 1.5.9, and  
>>>> already made first book from CCEL as a test.
>>>> After weekend I want to proceed with Russian book.
>>>> Is it possible to have categories not like /Books/English/[name  
>>>> of the book], but also something like this /Books/[Language]/ 
>>>> [Author]/[Name of the book]
>> or /Books/[Author]/[Name of the book]?
>>>> Thank you!
>>>> Serhiy
>>>>
>>>> -----Original Message-----
>>>> From: "Troy A. Griffitts" <scribe at crosswire.org>
>>>> To: Сергей Кузнецов<sergeyvk at ukr.net>, SWORD  
>>>> Developers' Collaboration Forum <sword-devel at crosswire.org>
>>>> Date: Thu, 12 Oct 2006 13:58:08 -0700
>>>> Subject: Re: [sword-devel] Questions about making module from  
>>>> usual book text
>>>>
>>>>> Сергей,
>>>>> 	sword can be build with ICU (Unicode support) or without.  So  
>>>>> you can
>>>>> either install libicu-devel, or else edit the sword usrinst.sh  
>>>>> file and
>>>>> look for the icu option near the top and change the line to  
>>>>> exclude it.
>>>>>
>>>>> 	Here is what I have installed on my FC5 system:
>>>>>
>>>>> [root at charis ~]# rpm -qa | grep -i icu
>>>>> libicu-3.4-6.2
>>>>> libicu-devel-3.4-6.2
>>>>> icu-3.4-6.2
>>>>>
>>>>>
>>>>> 	For deciding which utility to use, you have to decide how your  
>>>>> import
>>>>> file is divided up.  If it is formatted:
>>>>>
>>>>> $$$Key1
>>>>> data1
>>>>> $$$Key2
>>>>> data2
>>>>>
>>>>> then you would use the imp2gbs utility for a book.  If it uses  
>>>>> OSIS or
>>>>> ThML to divide up the to sections, then you would use xml2gbs.
>>>>>
>>>>> Please note that the utility doesn't depend on the actual tag  
>>>>> set you
>>>>> used in the data of each section.  In other words, you can  
>>>>> still divide
>>>>> up your entries using the 'imp' structure and the data for each  
>>>>> section
>>>>> could have OSIS tags.  Once imported into a sword module, the
>>>>> corresponding .conf (configuration file) will have an entry:
>>>>>
>>>>> SourceType=OSIS
>>>>>
>>>>> (or ThML, or whatever tags you choose to use in your module;  
>>>>> OSIS is
>>>>> preferred.)
>>>>>
>>>>>
>>>>> 	Hope this is helpful,
>>>>>
>>>>> 		-Troy.
>>>>>
>>>>>
>>>>>
>>>>> Сергей Кузнецов wrote:
>>>>>> Dear friends!
>>>>>>
>>>>>> I tried to compile the sword-1.5.9 on FC5, and I got this  
>>>>>> error, though ./usrinst.sh went well.
>>>>>>
>>>>>> ../src/utilfuns/utilstr.cpp:9:28: error: unicode/utypes.h: No  
>>>>>> such file or directory
>>>>>> ../src/utilfuns/utilstr.cpp:10:26: error: unicode/ucnv.h: No  
>>>>>> such file or directory
>>>>>> ../src/utilfuns/utilstr.cpp:11:29: error: unicode/ustring.h:  
>>>>>> No such file or directory
>>>>>> ../src/utilfuns/utilstr.cpp:12:27: error: unicode/uchar.h: No  
>>>>>> such file or directory
>>>>>> ../src/utilfuns/utilstr.cpp:14:28: error: unicode/unistr.h: No  
>>>>>> such file or directory
>>>>>> ../src/utilfuns/utilstr.cpp:15:30: error: unicode/translit.h:  
>>>>>> No such file or directory
>>>>>> make[1]: *** [utilstr.lo] Error 1
>>>>>> make[1]: Leaving directory `/data/LinuxDownload/sword-1.5.9/lib'
>>>>>> make: *** [all-recursive] Error 1
>>>>>>
>>>>>>
>>>>>> Another question is, what utility would you suggest for the  
>>>>>> file like practice (Books/English), of this kind:
>>>>>> <h1>Header</h1>
>>>>>> <p>text</p>
>>>>>>
>>>>>> Thank you!
>>>>>>
>>>>>> Serhiy
>>>>>>
>>>>>>
>>>>>> -----Original Message-----
>>>>>> From: "Troy A. Griffitts" <scribe at crosswire.org>
>>>>>> To: Сергей Кузнецов<sergeyvk at ukr.net>, SWORD  
>>>>>> Developers' Collaboration Forum <sword-devel at crosswire.org>
>>>>>> Date: Wed, 11 Oct 2006 14:51:38 -0700
>>>>>> Subject: Re: [sword-devel] Questions about making module from  
>>>>>> usual book text
>>>>>>
>>>>>>> Dear Сергей Кузнецов,
>>>>>>> 	I'm not sure what utilities come with the FC5 packages, but  
>>>>>>> if you
>>>>>>> build from source code, you will get quite a number of  
>>>>>>> utilities which
>>>>>>> may aide in your efforts.  We have just released  
>>>>>>> sword-1.5.9.  May I
>>>>>>> suggest you download the package at:
>>>>>>>
>>>>>>> http://www.crosswire.org/sword/software/swordapi.jsp
>>>>>>>
>>>>>>> 	and:
>>>>>>>
>>>>>>> tar xzfv sword-1.5.9.tar.gz
>>>>>>> cd sword-1.5.9/
>>>>>>> ./usrinst.sh
>>>>>>> make
>>>>>>> cd utilities/
>>>>>>> make
>>>>>>>
>>>>>>> Then you should see imp2gbs compiled in your current directory.
>>>>>>>
>>>>>>> You can also:
>>>>>>>
>>>>>>> cd ../tests/
>>>>>>> make
>>>>>>>
>>>>>>> and find a few helpful utilities:
>>>>>>>
>>>>>>> treekeytest
>>>>>>> genbooktest
>>>>>>>
>>>>>>> Which will show you the index of your newly created book and  
>>>>>>> let you
>>>>>>> traverse the tree and see the entries.
>>>>>>>
>>>>>>> I hope this is helpful.
>>>>>>>
>>>>>>> 	-Troy A. Griffitts
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>> Dear friends!
>>>>>>>>
>>>>>>>> I'm using FC5 and sword 1.5.8-7.fc5 and sword-devel  
>>>>>>>> 1.5.8-7.fc5 packages.
>>>>>>>>
>>>>>>>> I want to put some of books of our church into library. They  
>>>>>>>> are usual text, but for scriptures references I can make  
>>>>>>>> macros for OOo. I have read the Module Making
>> Guide,
>>>>>> but I
>>>>>>>> didn't find on my computer utility imp2gbs. From the web  
>>>>>>>> there are utilities only for windows. So far I found, that I  
>>>>>>>> have on my computer vpl2mod, and that's all, but
>> with this
>>>>>> I
>>>>>>>> can be wrong. What can I use and how to get it?
>>>>>>>>
>>>>>>>> Another point is that I looked inside the module practice,  
>>>>>>>> and apart of .conf file there are 3 files:
>>>>>>>> - practice.bdt
>>>>>>>> - practice.dat - binary
>>>>>>>> - practice.idx - binary
>>>>>>>>
>>>>>>>> The first one is simple html file with tags p, h1, h2 ...  
>>>>>>>> and scripture references. Such simple file I can create very  
>>>>>>>> easy, and I don't need any utilities. But how can I
>> make
>>>>>> other
>>>>>>>> two files, and do I need them, since they are very small,  
>>>>>>>> 1.7 kb and 100 b?
>>>>>>>>
>>>>>>>> Another different question. I want to make modules from  
>>>>>>>> books. Now I have categories Books/[Language]/[Name of a  
>>>>>>>> book]. Is it possible to make another sub
>> category for
>>>>>>>> author, eg. Books/[Language]/[Author]/[Name of a book] or to  
>>>>>>>> solve this in any other way, that I had books from one  
>>>>>>>> author in one category.
>>>>>>>>
>>>>>>>> Thank you for your work. Let God bless it!
>>>>>>>>
>>>>>>>> Serhiy Kuznyetsov,
>>>>>>>> Lviv, Ukraine
>>>>>>>>
>>>>>>>>
>>>>>>>> _______________________________________________
>>>>>>>> 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
>>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> 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
>
>
> _______________________________________________
> 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