Two summers ago, I was looking for a way to read the Bible on Mac OS X.
Under OS 9, I used the Online Bible.
At the time, Online Bible had not released a viable product for Mac OS X.
A little quality time with Google unveiled MacSword.
MacSword met all my qualifications. Free, open-source, good OS X integration, and it worked nicely.
I later recommended it to my dad. He liked it, but noted that some of the translations he likes, such as the NKJV, aren't available for any software that uses the SWORD Project's file format, due to copyright and licensing constraints.
I had simply lived with this limitation. When I pondered the problem, I realized that since Dad had purchased the Online Bible CD, he actually owned properly-licensed copies of the translations he was looking for. All he needed was a friendly geek to convert the appropriate data files to a format that MacSword could read...
A little research, some sweat, and a Python script later, he had an NKJV MacSword module, ready to go. No fancy trimmings, like many of the modules have, but it worked.
There are obvious legal problems with redistributing a MacSword NKJV module. However, there's no problem with me describing the process I used to do the conversion and posting the (ugly) Python script I threw together to help with the problem.
So, here's how to convert an Online Bible text to a MacSword module. The process is technical - you don't need to know how to program, but you may find it hard to follow if you haven't ever compiled software yourself. If you don't understand the basics of using the command line (via Terminal), you need to learn about that first. If you run into trouble, just tell me, and I'll see if I can help.
The idea is to create a VPL file (see section 3.3.1) from the Online Bible data file, and then use the SWORD Project's vpl2mod program to create a SWORD module from the VPL file.
In Online Bible, open a new Bible to Genesis 1:1, using whatever version you want to convert. Then, select 'Export...' from the File menu. For the range, specify the entirety of the Bible in question (this should be Genesis 1:1 through Revelation 22:21). Click OK, and specify a location/name for the exported text file. If you used the NKJV, nkjv.txt would be an excellent name.
Thus ends step one - you have a Macintosh text file, containing the translation you chose. However, this text file needs some tweaking before vpl2mod can use it.
Download this Python script, and at the command line, use it to create the VPL file from the exported text file you made in the previous step (you may need to change the permissions on the file in order to run it). Useage: olbconvert.py bibleTextIn bibleTextOut, where bibleTextIn is the exported text file, and bibleTextOut is the name you want the vpl file to have. Continuing with the assumption that you used NKJV, you might run it with the following command line:
./olbconvert.py nkjv.txt nkjv.vpl
The next step, using vpl2mod to create a SWORD module, is a bit tricky. You'll need the SWORD libraries installed on your machine. The easiest way to install them is probably to use MacPorts (previously DarwinPorts).
Once you have vpl2mod working on your system, get a copy of the ASV module in the same directory as the VPL module you created in the previous step. This will serve as the basis for your new module.
From the directory you have the ASV module stored in, where you should also have your nkjv.vpl file, run the following command:
vpl2mod nkjv.vpl ASV/modules/texts/rawtext/asv 1
It will take some time to run. If it has worked properly, no output will be displayed. If you see the text 'problem' as output, you know there's an issue somewhere - enjoy the Googling. Otherwise, move on to the next step, which is finalizing your new module.
This is pretty straightforward. Begin by renaming the ASV directory to the appropriate name for your Bible version. In our example, rename it to NKJV. Also, rename the directory at NKJV/modules/texts/rawtext/asv appropriately - for instance, rename it nkjv.
Almost there. Back in your new module's base folder (NKJV, if you've been doing this as per the examples), there's a folder named 'mods.d', which contains a file called 'asv.conf'. Rename this to 'nkjv.conf', and open it with a text editor, like TextEdit.
At the top of the file is the line
[ASV]
Update this to match the name you've given your module (the new name you gave the top-level folder of the module, like NKJV).
The next line reads
DataPath=./modules/texts/rawtext/asv/
Update this appropriately for the changes made earlier - the updated example version would be:
DataPath=./modules/texts/rawtext/nkjv/
That's all you actually need to do to create a new module. However, for your own sanity, it would be wise to update the remaining lines, so that the introductory page reads appropriately, and you don't get confused as to which module you're using.
Congratulations, you have a brand-new SWORD module! To install it, just put a copy of the new directory you created in the 'Modules' folder (for those following my example, this would be the NKJV folder), which should be in the same spot that you put the MacSword application. Boot up MacSword, and enjoy your new module.
Although this tutorial was written for OS X users, you should be able to use a module made in this fashion on any *nix-based system. If I had the time to hack through Online Bible's file format, it would be possible for pure Linux users to get NKJV for SWORD, by ordering the Online Bible CD-ROM and doing all this on their own machine. Right now, you need to have access to an OS X-based Mac (or even OS 9-based. The script works with exports from either version of Online Bible), in order to do that initial export.
Maybe someday...