[sword-devel] SCRIPT: Covert Traditional Book Names to Short Sword Names

Andrew Thule thulester at gmail.com
Wed Aug 1 07:15:02 MST 2012

On Tue, Jul 31, 2012 at 2:51 AM, Peter von Kaehne <refdoc at gmx.net> wrote:
> You did not tell what the ultimate purpose for your conversion is, but assuming you want to create OSIS references, you might want to investigate using the sword API for doing the job. That is one of the things it is excellent at.

The purpose of the script was support my effort to make conversion of
non-standard text formats into OSIS less manual - hopefully completely

> I created a a while ago a Perl script which translates following
> <reference>A_long_and_complicated_series_of_references_in_any_supported_language<reference>
> into
> <note type="crossReference"..><reference osisRef=...>....
> Where the "long and complicated series..." is broken up, translated into OSIS refs and put together into a crossreference note, with the original text as free text.
> The heavy lifting is done by Sword and relies on the sword Perl bindings
> It is in sword-tools/modules/crossreferences/xreffix.pl

I'm having trouble getting the Perl binding working, but am otherwise
keen to give xreffix.pl a try.

> Unfortunately the PHP bindings are in a poor state AFAIK, but maybe you can reactivate them and use them for your purposes

PHP is not essential when sed and awk are instead unleashed.

That said, I have an additional question about converting to OSIS
standard book names.  I notice from my exercise of creating the above
scripts that abbr.conf doesn't actually contain the correct
abbreviations (from OSIS2MOD's perspective).

For example abbr.conf recommends:

Yet osis2mod produced errors, complaining about Ex, Pss, Eze, Ob, Mt,
Mk, and Lk.  These errors went away when I instead used:

Have I failed to grasp the purpose of abbr.conf, or is this a hiccup
between abbr.conf and osis2mod?


More information about the sword-devel mailing list