[sword-devel] My project

Mark Morley sword-devel@crosswire.org
Sat, 10 Apr 2004 18:29:05 -0700


Hi all,

First thing: I'd like to thank those behind the sword
project.  Great job folks!

Thought I'd tell y'all about my little project involving
sword.  I posted something about this in the forums, but
they don't look like they get much traffic.

I only discovered the sword project a few days ago and
it immediately got my gears spinning.  The first thing
I wanted to do was to rewrite my web bible software
to use sword modules.  But without native PHP support,
it wasn't possible (SWIG is not an option in this case).

So last night I started writing a "sword daemon", a
server process along the lines of SMTP, POP3, FTP, etc.
It's a c++ program that runs on FreeBSD (and presumably
most other UNIX/Linux systems).  You connect to it and
issue commands to query the sword system (list modules,
get module details, search texts, etc)

With such a system, end clients do not need to link in
the sword libraries, or even have local copies of any
modules, etc.  The result is that module storage and
processing resources are offloaded to a central server,
and lightweight sword clients, written in any language
that can access TCP sockets, can run just about anywhere.

After an all night session, I have completed the initial
version of 'swordd', and I also wrote a PHP client that
accesses it, which I'm calling phpSword (which I'll change
if that conflicts with anyone else).

You can take the client for a spin at this URL:

   http://christian.net/sword.php

It's not too fancy yet, but already quite useful.  I'll
pretty it up later...

The source code for that is only 440 lines long, including
style sheets and everything else.  It gets all its data
from 'swordd', which is running on the same server but
could be running anywhere in the world.  'swordd' can
handle any number of simultaneous connections (limited
by the server resources of course).

Currently it allows you to view any number of texts and
commentaries side by side.  It also has pop-up Strong's
lookups when using a module that supports them.  I just
added a basic interface to the lexicons & dictionaries
as well, and I've got a long list of features to work on.

If there is interest in swordd, I'll be happy to contribute
it to the project once I clean it up and document it a bit,
and I'll put more effort into additional features. If not,
that's ok too - it does what I need.

Mark
mark@christian.net
http://christian.net/