[sword-devel] locked modules and osis2mod
dmsmith at crosswire.org
Wed Jul 1 04:59:35 MST 2009
Sorry for the new thread. I can't find Brian's email to reply.
I'll try to give a reply to what I remember was asked.
Running the program will give a short synopsis of how to run it but it
sometimes is not enough.
The documentation for osis2mod can be found here:
If it is not complete enough, feel free to change it or to poke me.
To create a locked OSIS module, use the -c flag, as in:
osis2mod ./modules/texts/rawtext/kjv kjv.xml -c abcd1234efgh5678
It appears that the -c flag is broken. It used to work. As we don't do
many locked modules, I can't say when it was last used successfully.
This will create a raw module and put the files into the pre-existing
./modules/texts/rawtext/kjv folder. (You could have just as well used
any folder, but I find this easiest in zipping up the module for
inclusion into a repository.)
To verify that the module has been enciphered you can look at the built
raw file with a text editor or pager:
To create a module both osis2mod and the conf have to agree. This is not
an obvious task and thus not easy. Later we'll have osis2mod spit out a
suggested conf. (Tei2mod writes one to standard out.)
Documentation for the conf is here:
To indicate a module is locked add the following to the conf:
The fact that it is present will indicate that the module is enciphered.
That it is empty will indicate that it is locked.
To unlock a module, provide the cipher as in:
It needs to be the same as what was used to create the module.
Note on the cipher:
We use Sapphire II to do the locking and unlocking. It will use a key
from 1 to 256 bytes long, or 8 to 2048 bits. We typically use 16 ascii
characters. Using unprintable characters is possible.
I find it interesting that enciphering and deciphering are identical
code paths. Give plan text and a key and the routine will encipher the
text. Give the enciphered text and the key and the same routine will
Hope this helps.
Brian, separately I'll send you an enciphered module.
More information about the sword-devel