mvnForum Homepage

Print at Mar 29, 2015 7:28:53 PM
Posts: 15   Pages: 2   [ 1 2 | Next Page ]
View all posts in this thread on one page
Posted by rmcape at Aug 16, 2010 8:28:50 AM
What is the internal structure of a module?
What is the internal structure of a module?
Is it documented anywhere? I need to know.

I want to go from one format (xml) directly to a sword module. I'd prefer to not go through OSIS, TEI, or other format.

Thanks for enlightenment.

Bob

Posted by mdbergmann at Aug 16, 2010 12:53:14 PM
Re: What is the internal structure of a module?
Hi Bob.

I believe there are different internal formats for bibles, dictionaries and generic books.
So far I don't think this format is documented in other form than the sources.
You could use the SWORD API to create a module from your XML files. Basically our tools osis2mod, tei2mod and the like do the same, they are just an application which uses the SWORD API. If you do that you are free to use different source formats.
However we recommend to use one of our supported formats.



Manfred

Posted by rmcape at Aug 18, 2010 8:32:45 AM
Re: What is the internal structure of a module?
Hi Manfred,

Thanks!

Bob

Posted by DavidStrickland at Aug 23, 2010 6:09:02 AM
Re: What is the internal structure of a module?
The first part of the internal structure is found in the Config file in the mods.d directory.
The structure of this file is documented in http://www.crosswire.org/wiki/DevTools:confFiles.

Some details from that documentation

There are currently 11 different possible formats for the contents of a module.

RawText, zText, RawCom, RawCom4, zCom, HREFCom, RawFiles, RawLD, RawLD4, zLD, RawGenBook

3 are used the most. These are the compressed formats. zText, zCom, and zLD. These are compressed using ZIP or LZSS. Zip is the ZLib library created by Jean-loup Gailly and Mark Adler is used to compress and decompress most content. LZSS is all but obsolete.

Posted by pneaveill at Sep 1, 2010 6:27:53 PM
Re: What is the internal structure of a module?
Without getting too techie here, what are the differences between the various types of compression and in what situations would one matter over another (what difference does it make with one over another). Not sure how to word that without it sounding either stupid or demanding -- apologies in advance.

Posted by mdbergmann at Sep 2, 2010 1:50:05 AM
Re: What is the internal structure of a module?
Well, the difference is the algorithm used to compress the data.
I think though that only ZIP is used. All modules I have seen that were compressed used ZIP.
zlib however is able to also compress in different formats. That doesn't mean though that we use it.


Manfred

Posted by pneaveill at Sep 2, 2010 6:00:35 AM
Re: What is the internal structure of a module?
Sorry, in my haste last evening had asked info on the wrong thing. What differences are the module formats -- how do they differ and all that please?

Posted by pneaveill at Sep 2, 2010 2:13:17 PM
Re: What is the internal structure of a module?
Degree is in Bible and experience in hardware, so willing to tackle this if can get tutorial or whatever please.

Posted by mdbergmann at Sep 2, 2010 2:25:57 PM
Re: What is the internal structure of a module?
All modules formats are basically stored to disk using a custom binary encoding.
Dictionary, Bibles/Commentaries and Genbooks all differ.
I can't go into details because I don't know them myself.
If you want to know it exactly you'll have to read the sources or ask in the mailing list.


Manfred

Posted by pneaveill at Sep 2, 2010 4:45:49 PM
Re: What is the internal structure of a module?
Sorry for the newbish question here, but how to get/post on that list please?

Posts: 15   Pages: 2   [ 1 2 | Next Page ]