What is this ?

Rapier is a python bible reader application for maemo. It uses the Sword library to access bible translations, as well as to search text occurences in the available books.

Sources are available on maemo garage svn.

First steps with Rapier.

Installing a module with the GUI

The first thing to do do once Rapier has been installed is to tell where to store the translations (modules) that are going to be installed later on.

This step is mandatory for os2007. For os2008, the default setting is to store modules in /home/user/sword.

Go in the Preferences menu, click on the 'Change' button and select a new directory on your memory card or in your Document directory. Choosing to store the modules on a memory card is recommanded as there is a risk of filling the tablet with data if you choose to use your local Document directory, and if this happens, all that will be left to do would be to reflash the tablet.


Then, you need to install at least a list one module. Be sure the internet connexion is working, go in the Manage menu and click on the 'Remote' tab. Then fetch a list of available modules by clicking the 'Refresh' Button. Select a module to install and click on 'Ok'.


If everything worked as expected, you should now have a local module available for reading.If you want to be able to search text in a module, you need to create a clucene index: go in Menu/Manage/ 'Installed' tab,and select the module you want to build an index for. Click on 'ok'.


Et voila !

Now, the rapier module installation code is really bad (patches are welcome) so you may experience problems... If this is the case, try uninstalling the module and reinstalling it again with debug activated (see the preferences menu) and send me a copy of /tmp/rapier-debug.txt and of /usr/etc/sword.conf.

A closer look at the Sword library.

Rapier use the Sword library in order to access books translation. A sword module can be installed with a command line utility (installmgr) that you may wish to have a closer look at if things fails with the gui. You can also use a sword based software on your pc, prepare modules and indexes from there, and put them in your tablet afterward to gain some time.

The main sword setting is the DataPath, the directory where the modules will be located. On Os 2007, This is stored in /usr/etc/sword.conf and can be changed with rapier in the preferences menu. On Os 2008, this value is not hardcoded anymore in /usr/etc/sword.conf but depends from a preference settings that is stored as a gconf key, so you dont need to touch this file. If you are using command line utility such as installmgr on os2008, you will have to set the SWORD_PATH environment variable so it points to your module's storage location or the utility won't find them.

The mods.d subdirectory countain configuration file per installed modules. This is how one knows if a module is installed or not. More information about those file can be found on the sword site. Basically, installing a module is just a matter of copying the module.conf file in mods.d directory and the actual books (and eventual index) directory wherever they are supposed to be located (this is specified in the (yet another) DataPath value of the module configuration file).

Rapier's GUI only give you access to the stable modules available on the Sword ftp site. There is also a beta directory where other module can be installed. You can use installmgr to have access and install those beta modules.

Some words for the scholars...

I do not read nor greek nor hebrew, but it looks like font rendering is automatically done by gtk as long as a proper font is installed. I have no clue if the rendering is correct though :)

Strong's number

Strong's number are an exhaustive cross-reference of every word in the KJV back to the word in the original text. The KJV Sword modules contains the Strong's number information. However, there is no option to index the word use per verses using a clucene index as it s the case for the translated words. In order to use Strong's number search, you will have to download and unzip a strong.db database (that's a simple sqlite database) in your tablet, and tell rapier where to look for it in the prefernces menu.

When you use the KJV module, a "Strong's number" check box appears in the toolbar.If you checked it, you'll see the Strong's number reference in the text just after the word they are associated with.

Double clicking on a Strong's number start a search for this word and display the result as usual (note that you cannot search for translated word when displaying Strong's number). Now, if you also have installed the associated Sword dictionnary, a new window will open with more information about the selected word.

The dictionnary modules are available in the 'en' section of the modules manager: StrongsGreek and StrongsHebrew.

Python goodness.

Rapier is written in python. I took some notes on how i builded and use the python-sword module that may be interesting to whoever wants to start using the sword library in python.