[sword-devel] Grep or Sed Command to Automate OSIS References?
Maxwell Murunga
maxmmur at gmail.com
Tue Feb 4 10:27:27 MST 2020
Thank you Dominique; Thanks Cyrille; Thanks Greg.
# “Additional” steps to get the awk script
# working fine on macOS as it does on Linux
$ brew install gawk
# If Terminal Throws Error
$ brew unlink awk
$ brew link --overwrite gawk
# Confirm all went well!
$ gawk --version
# Now proceed as normal
# Make the executable
$ chmod +x Ref2Osis.sh
# Thereafter, run it
$ ./Ref2Osis.sh
Works Perfect.
Blessed [be] the LORD God of Israel from everlasting, and to everlasting.
Amen, and Amen.
~~Shalom.
On Sun, Feb 2, 2020 at 3:39 AM Cyrille <lafricain79 at gmail.com> wrote:
> What are you doing exactly? If you try to convert the ref to osisRef
> Dominique wrote an awk script which works pretty good.
> See the attached file.
>
> Le 01/02/2020 à 18:06, Maxwell Murunga a écrit :
>
> Greetings Saints,
>
> I'm processing an OSIS Commentary in InDesign using GREP:
>
> *Find: *((\d+ )?(\w+?.? \d+[:]\d+)(.\d+)?([, \d]+(.\d+)?)*)
> *Replace:* <reference osisRef="$1">$1</reference>
>
> It partially accomplishes the task, but does not automatically convert the
> book names to the standard OSIS abbreviations. I also need help in figuring
> out how to add looking for Arabic and Roman numerals (1-2 instances of the
> letter "I"; or simply "1" or "2" ) to cover instances of something like I
> Corinthians or II Corinthians; 1 Corinthians or 2 Corinthians.
>
> Could anyone be so kind enough as to provide a *grep* or *sed* script to
> auto convert any kind of Bible reference into this format:
>
> <reference osisRef="Gen.1.1">Genesis 1:1</reference>
> <reference osisRef="2Chr.1.1">2 Chronicles 1:1</reference>
> <reference osisRef="2Chr.1.1">II Chronicles 1:1</reference>
>
> In Christ Alone,
>
> Maxwell.
>
> _______________________________________________
> sword-devel mailing list: sword-devel at crosswire.orghttp://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/20200204/528b8397/attachment-0001.html>
More information about the sword-devel
mailing list