[sword-devel] Grep or Sed Command to Automate OSIS References?

Maxwell Murunga maxmmur at gmail.com
Sat Feb 1 16:06:13 MST 2020


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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.crosswire.org/pipermail/sword-devel/attachments/20200202/9e9e6062/attachment.html>


More information about the sword-devel mailing list