[Pkg-crosswire-devel] Bug#640357: Provide python SWIG bindings

Ben Armstrong synrg at sanctuary.nslug.ns.ca
Sun Sep 4 15:16:37 BST 2011


Package: sword
Severity: wishlist

Please provide a libsword-python package of the python SWIG bindings for
libsword.

I have two purposes in mind:

First, I wanted to evaluate the GPL'd, python-based BPBible package,
which is not yet in Debian (see http://bpbible.com/) but looks like a
suitable candidate. In its README.txt gives these instructions for
building python bindings:

	If you want to install them under Linux, the procedure will probably be:
	<change into the bindings/swig directory of the SWORD source code>
	cd package
	./configure
	make pythonswig
	make python_make
	cd python
	python setup.py install

After installing the necessary dependencies, I did this and successfully
locally installed the python bindings. BPBible runs fine after this
with:

	cd <path-to-bpbible>
	python bpbible.py

After I used "File -> Set Sword Paths" to add /usr/share/sword and
~/.sword, BPBible finds and uses the sword modules I installed from
Debian packages and using the module manager in Xiphos.

Second, in addition to being useful to run BPBible, I have it in mind
(in my copious amounts of spare time ;) to do some of my own programming
with the bindings. I would like to make a VIM script in python enabling
easy insertion of sword texts into a document. VIMoutliner is my
preferred outliner for taking notes of sermons and at Bible study group.
While I could always use Xiphos or Diatheke to export a scripture and
then paste it into the outliner, this is cumbersome and diverts
attention from listening to the speaker. My idea to solve this is to
bind some VIM key to read a sword reference from the current document,
e.g. "(ESV:Rom 8:1-4)", and insert the text before or after the
reference text.  Of course, I could have vim shell out and use diatheke
to fetch the text, but that seems clumsy compared to using python
bindings to accomplish the same thing.

-- System Information:
Debian Release: wheezy/sid
  APT prefers unstable
  APT policy: (800, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 3.0.0-1-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_CA.utf8, LC_CTYPE=en_CA.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash






More information about the Pkg-crosswire-devel mailing list