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

DM Smith dmsmith at crosswire.org
Wed Aug 1 08:02:27 MST 2012

Regarding the difference between the OSIS book abbreviations and abbr.conf:
OSIS has a fixed abbreviation for each book.

The SWORD Engine in parsing a reference tries to take arbitrary input and understand it. So the abbreviations there are for that purpose. They are also used as the "best" for displaying to an end user.

In Him,

On Aug 1, 2012, at 10:15 AM, Andrew Thule <thulester at gmail.com> wrote:

> 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
> automated.
>> 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:
> Exodus=Ex
> Psalms=Pss
> Ezekiel=Eze
> Obadiah=Ob
> Matthew=Mt
> Mark=Mk
> Luke=Lk
> Yet osis2mod produced errors, complaining about Ex, Pss, Eze, Ob, Mt,
> Mk, and Lk.  These errors went away when I instead used:
> Exodus=Exod
> Psalms=Ps
> Ezekiel=Ezek
> Obadiah=Obad
> Matthew=Matt
> Mark=Mark
> Luke=Luke
> Have I failed to grasp the purpose of abbr.conf, or is this a hiccup
> between abbr.conf and osis2mod?
> ~A
> _______________________________________________
> sword-devel mailing list: sword-devel at crosswire.org
> http://www.crosswire.org/mailman/listinfo/sword-devel
> Instructions to unsubscribe/change your settings at above page

More information about the sword-devel mailing list