[sword-devel] Problem understanding wiki
johnduffy at cgcf.net
johnduffy at cgcf.net
Wed Nov 4 06:50:14 MST 2009
Thanks for that info. It was a great help. I've got a module produced and
can see it in BibleCS and Xiphos (not tested others yet).
As a result, I noticed that I had further editing to do on usfm2osis.pl as I
hadn't noticed that some of the poetry output was not good osis (I've spent
lots of hours on this as I didn't know perl, and have now got the paragraph,
verse eID and poetry all in the right order in the osis output). There are
no problems in the USFM, and it displays really nicely in Bibledit. But
despite now having what seems to be good osis, it still doesn't always
produce good display in a Sword module, with poetry sections initially not
starting on new lines, paragraphs spaced out too much, first chapters of all
NT books in bold, all NT verses having the last character of the previous
verse (or preverse) inserted at the start of the next verse while all the OT
is OK, and so on. And I can find nothing on the wiki to help at this point.
I know that it would be somewhat easier with vpl format only, but I want to
keep the paragraph and poetry from the original. To be honest, I'm weary of
so much effort and time taken up trying to overcome one hurdle after
another. Module creation isn't for the average user.
But trying to overcome the issues I have at present, are there any
'uncompressed' sample modules available for comparison which contain poetry
and paragraphs? Also, what normally happens at this stage? Is it normal
for modules to need a lot of editing to get them to display correctly? Or
should running osis2mod produce finished modules ready for use and
submission? Also, is there any info on the wiki about the format of Sword
modules, and how to edit them? And after submission, what happens modules
before final publication on the site - do they go into beta testing as
appears to be the case from a beta module list I've come across on the wiki?
Are any of the issues above known with solutions?
Help much appreciated.
From: DM Smith [mailto:dmsmith at crosswire.org]
Sent: 03 November 2009 11:33
To: johnduffy at cgcf.net; SWORD Developers' Collaboration Forum
Subject: Re: [sword-devel] Problem understanding wiki
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