[sword-devel] xreffix.pl and possible future questions

Peter von Kaehne refdoc at gmx.net
Thu Jun 28 00:44:48 MST 2012

On Thu, 2012-06-28 at 05:58 +0000, luke wrote:
> ☑ Ran xreffix.pl
>      error missing Sword.pm in @INC
> So now I'm back on the mailing list asking how can I get Sword.pm installed in my ubuntu system. 

xreffix.pl requires installed Perl bindings for Sword. You can get these
currently only by compiling from source - download the source for sword,
compile it, install it, change over into the bindings subdirectory, into
swig, read the instructions and follow them

As this is a considerable step, which many will fail upon and as it is
not necessary for many Bibles (without xrefs), the xreffix it is not
included in usfm2osis.pl.

To run it successfully you need to do several things:

1) create a locale file. You can take any existing one (in Linux
under /usr/local/share/sword/locales.d or /usr/share/sword/locales.d)
and copy it, edit accordingly and add it again to the same location
under the new name (<language-code>-utf8.conf)

2) edit xreffix.pl according to the conventions of your USFM references
- separators for chapters and verses are highly variable accross
languages. Do not forget to set the language code in the xml file

xreffix.pl has a very large debug output - it makes sense to save it and
analyse it - even once it seems to work well. It will show you where
xrefs are wrongly encoded etc.   
xreffix.pl is a very rough script. I wrote it to do what I want and i
took very little care to make it play nice. It certainly is not a fire
and forget type script.

If you really struggle, I am happy to take over that step for you (once
you have a decent locale file)

And with regard to titles - yes, David is right, titles are a nightmare
right now and I am less than impressed with them. My title_cleanup.pl is
in need of major overhaul and it will be, but I am unable to put a time
scale to it (apart from stating, it is one of my current and the most
serious project)


More information about the sword-devel mailing list