[sword-devel] Problem understanding wiki
dmsmith at crosswire.org
Tue Nov 3 04:32:30 MST 2009
On Nov 3, 2009, at 5:46 AM, <johnduffy at cgcf.net> <johnduffy at cgcf.net>
> I'm trying to understand how to convert an osis file to a
> functioning module
> in a Sword frontend. I'm following the steps at the wiki
> http://www.crosswire.org/wiki/DevTools:Modules, and using
That page is not as useful as this one:
> However, after 'importing' the osis file, or rather converting it to
> files (ot.vss, ot, nt.vss, nt), I am not clear as to what to do
> next. The
> next step seems ambiguous:
> "To compress a Bible, commentary, or LD module, use the mod2zmod
> First you will need to install the module so that it can be accessed
> the SWORD engine. Next, run:" and then gives the syntax for the
> executable mod2zmod. But does that mean that I should install the
> before compressing it by running mod2zmod?
Don't use mod2zmod, rather use osis2mod to compress it.
Generally, I'll create the following folders in the same directory as
my xyz.xml file:
(where xyz is the lower case [name] of the module, in the conf.)
In mods.d, I'll put my xyz.conf. Osis2mod does not need it, but it
makes a later step easier.
I'll then run the following:
osis2mod modules/texts/ztext/xyz xyz.xml -z
Then I'll package it as a "raw" zip file with:
(Note, XYZ is the exact casing of the [name] in the conf.)
zip -r XYZ.zip modules mods.d
During development it is useful to build an uncompressed module so you
can read the files. I generally will create a simple folder, say "raw"
for output (that way I don't have to dig down a long path for the
files). Since I am debugging, I'll often use the -d option on osis2mod
to mark each verse with it's reference:
osis2mod raw xyz.xml -d 2
> If so, how do I install it? The
> instructions later on for installing a module imply that a single
> module or
> folder with module files is produced. All I have is the four
> files. I've
> been unable to compress them, as mod2zmod is looking for a module
> which I don't have. Am I doing something wrong?
No you are not doing something wrong. Mod2zmod is very useful to
compress modules that are currently installed and not compressed. It
is awkward otherwise.
I think it will look for mods.d and modules in the current folder and
use mods.d/xyz.conf to find the module under modules/.
You might need to copy mod2zmod to the same folder as mods.d and
modules. (I think that is needed on Windows. It is not on the Mac or
Hope this helps.
More information about the sword-devel