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

Andrew Thule thulester at gmail.com
Wed Aug 1 10:14:51 MST 2012


Thank you both. Both explanations make complete and utter sense.  I see now
the logic, but at the risk of furthering my appearance as a fool, may I ask
..

... notwithstanding the fact there is no direct need, if the OSIS
abbreviations are already mostly the same, and are not standard (public
facing) abbreviations and are mere tokens for osisID and osisRefs, why not
marry the two up for the sake of consistency (which, I recognize is the
hobgoblin of little minds, one of which, I possess).

Currently these tokens already match in nearly every instance except for
the seven I listed (hmm, curious, seven, providence perhaps?):

'Ex' vs 'Exod'
'Pss' vs 'Ps'
'Eze' vs 'Ezek'
'Ob' vs 'Obad'
'Mt' vs 'Matt'
'Mk' vs 'Mark'
'Lk' vs 'Luke'

I can see now why and how they aren't actually related, but still,
consistency is rarely a detriment even if but arbitrary.  I suppose given
all of the other things Sword developers are under pressure to accomplish,
this really is at the bottom of the list of things to worry about.

~A


On Wednesday, August 1, 2012, DM Smith wrote:

> 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,
>         DM
>
> 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
>
>
> _______________________________________________
> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.crosswire.org/pipermail/sword-devel/attachments/20120801/4eb982d9/attachment.html>


More information about the sword-devel mailing list