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

Andrew Thule thulester at gmail.com
Tue Jul 31 12:02:26 MST 2012


Perfect Peter, much appreciated.  I'll give it a go, and see how it goes.
 Its nice the API is so flexible.

~A

On Tuesday, July 31, 2012, Peter von Kaehne wrote:

>
> > Von: Andrew Thule <thulester at gmail.com <javascript:;>>
>
> >  This one is shorter
> > using awk not php slightly more elegant and handles books of the form
> > 1 John and 1John:
>
> 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.
>
> 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
>
> Unfortunately the PHP bindings are in a poor state AFAIK, but maybe you
> can reactivate them and use them for your purposes
>
> Yours
>
> Peter
>
> _______________________________________________
> sword-devel mailing list: sword-devel at crosswire.org <javascript:;>
> 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/20120731/8640074f/attachment.html>


More information about the sword-devel mailing list