[sword-devel] How to zip module files

DM Smith dmsmith555 at yahoo.com
Thu Feb 28 19:34:02 MST 2008

On Feb 28, 2008, at 8:47 PM, NF wrote:

> Thanks, DM!
> I have done the editor to edit and generate the compressed module file
> through a click. It works fine. (Still prototype though.) It also
> supports importing existing modules into the editor.
> Right now, when I try to package the module and conf to a zip file so
> I can test export function as well as downloading, the program
> fails(jsword 1.5 api).
> Through debugger, I noticed that when it tries to unzip the zip file,
> it treat mods.d and other module structure (module, text, ztext, ....)
> as files instead of directories. thus the unzip operation failed.
> How do you run the  simple recursive zip? That is what I am asking...


First create the directory structure you need for the module:
mkdir mods.d
mkdir -p modules/texts/ztexts/kjv

Then make the module, directing the output to the directory you created.
osis2mod modules/texts/ztexts/kjv kjv.xml -z

And copy the conf to mods.d
cp kjv.conf mods.d

Now zip up the directories, using -r to specify recursion

zip -r kjv.zip mods.d modules

In Him,

More information about the sword-devel mailing list