Aquarionics

Saturday 8th March 2008

Swordfighting

Still no idea what I’m going to do at BarcampBrighton next weekend. Ideas anyone?

I’ve been running an IRC bot for a channel I’m an admin for. One of the things we want it do do is biblical quotations. Actually, we only need it to do one biblical quotation, which is Revelations 2:5, which it already does by a simple text match, but I wanted to solve the general problem.

Turns out there’s a thing called Sword, which is a bible API and comes with Python bindings though SWIG. Unfortunately, Debian doesn’t package the Sword library directly, only though things like gnomesword, but it does include the datafiles. So I downloaded the latest sword source and compiled it.

automake: no such option -ac

This is the kind of thing that annoys me when installing from source. It’s the error message that doesn’t actually tell you what’s wrong. For example:

automake: no such option -ac means “Your install has automake 1.4 and I need 1.9”

This took me a while, but I got there in the end. This, fortuantely, is packaged, and apt-get install automake1.9 made that go away. To be replaced by:

gcc: File Not Found: Sword.cxx

Which was entirely accurate. There was no file called Sword.cxx anywhere on my system. Turns out this was caused by three things being wrong. First, I did not have swig installed and the configure failed silently. Second, you have to use the command:

make pythonswig

Even when you do_ have swig installed. And finally, if your swig install is two point releases off bleeding edge (Say, you’re running Debian. Any version. Up to and including unstable) you have to upgrade _that from source too. And that you only discover if you run make pythonswig and get a screenfull of C errors.

And then? Then you get a different screenfull of C errors. At this point I have worked out why Debian don’t package it.

Fuck it. I imagine the bible tools only work for the devout.

Those who spoke on this:

gravatar image

Jenny S-T:

2008-03-08 21:49 26 mins after the Original Article

Calling it by the correct name of Revelation rather than Revelations might help.

Comment Link

gravatar image

Benjamin A'Lee:

2008-03-09 01:31 4 hrs after the Original Article

Well, in Debian there’s a package called “bible”, which displays a requested verse, and “bible-kjv”, which contains the text of the King James Version. A couple of lines of code to parse the output, and you’re done.

Comment Link

gravatar image

Aquarion:

2008-03-09 09:25 8 hrs after Benjamin A'Lee

My eventual solution was to use http://www.esvapi.org/api/, which is a free web API and has a proper parser and everything.

Comment Link

gravatar image

mrben:

2008-03-10 20:53 1 day after Aquarion

You could, of course, have used a livecd like Ubuntu CE or Ichthux….

Still – many ways to skin a cat, and all that.

Comment Link

gravatar image

Aquarion:

2008-03-10 23:58 3 hrs after mrben

Um, wha?

This is not packaged, there are no packages, because it doesn’t compile.

Comment Link


Nicholas 'Aquarion' Avenell is a web developer in London, you can find out more about him or how to get in touch.

There are more Articles, Projects, Journal Entries, Photographs and things that defy description here, too.

If you're looking for something specific, there are Calendar & Category -based lists of everything.

And if you want to follow stuff that appears here, try a Syndication Feed, or the generic Feed of everything.


Aquarion's last Twitter was: [updating]
Twitter last updated


More Journal:

[RSS Icon]
[ESF Icon]
[CDF Icon]

That which is relevant:


Explain Ads
© 2000 to 2008 inclusive Nicholas Avenell
All comments are the property of their creators, published with permission
(Unless otherwise indicated, the opinions and sentiments expressed on this site are those of the author and not of any organisation of which he is an affiliate, including his employer. Caveat Lector, E&OE. sigh)
0.194 seconds, 28 queries, 2.67Mb on Thu, 02 Oct 2008 02:36:54 +0000
Generated by Epistula Version 2.0.3