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

2020-02-04 Thread Cyrille
Le 04/02/2020 à 16:25, Greg Hellings a écrit : > No, that's this project: https://pypi.org/project/pysword/ > > It attempts to be compatible with reading Sword files, but it wouldn't > have all the same bindings and features of the whole engine. > Ok I just wrote to Roberto Sanchez, he is the deb

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

2020-02-04 Thread Greg Hellings
No, that's this project: https://pypi.org/project/pysword/ It attempts to be compatible with reading Sword files, but it wouldn't have all the same bindings and features of the whole engine. --Greg On Tue, Feb 4, 2020, 15:23 Cyrille wrote: > > > Le 04/02/2020 à 13:21, Greg Hellings a écrit : >

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

2020-02-04 Thread Cyrille
Le 04/02/2020 à 13:21, Greg Hellings a écrit : > > > On Tue, Feb 4, 2020 at 12:05 PM Cyrille > wrote: > > > > Le 04/02/2020 à 13:01, Greg Hellings a écrit : >> >> >> On Tue, Feb 4, 2020 at 11:52 AM Cyrille > > wrote: >> >>

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

2020-02-04 Thread Greg Hellings
On Tue, Feb 4, 2020 at 12:05 PM Cyrille wrote: > > > Le 04/02/2020 à 13:01, Greg Hellings a écrit : > > > > On Tue, Feb 4, 2020 at 11:52 AM Cyrille wrote: > >> Hello Greg, >> Can you give more information about this python library please. It's >> interesting. How to use it? >> > > The Python lib

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

2020-02-04 Thread Cyrille
Le 04/02/2020 à 13:01, Greg Hellings a écrit : > > > On Tue, Feb 4, 2020 at 11:52 AM Cyrille > wrote: > > Hello Greg, > Can you give more information about this python library please. > It's interesting. How to use it? > > > The Python library is a bindi

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

2020-02-04 Thread Greg Hellings
On Tue, Feb 4, 2020 at 11:52 AM Cyrille wrote: > Hello Greg, > Can you give more information about this python library please. It's > interesting. How to use it? > The Python library is a binding of the C++ library that is auto-generated with Swig. So its API is almost the exact same as the C++

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

2020-02-04 Thread Cyrille
Hello Greg, Can you give more information about this python library please. It's interesting. How to use it? Is the library in the linux repo? Le 04/02/2020 à 12:41, Greg Hellings a écrit : > Maxwell, > > If you install the Python bindings to the Sword library, you can use > the library's extensiv

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

2020-02-04 Thread Greg Hellings
Maxwell, If you install the Python bindings to the Sword library, you can use the library's extensive parsing information as well as its knowledge of locales. A very simple Python script[0] will iterate all lines of input (you can give it a list of file arguments, you can pipe the output of a diff

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

2020-02-04 Thread Maxwell Murunga
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 pro

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

2020-02-01 Thread Greg Hellings
If you know that you have a reference (e.g. if you're not looking for references within random blocks of text) then you can use something like our Python bindings to pass strings into it and ask our engine to generate the OSIS id. This is probably the best route to take as our Engine has rather sop

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

2020-02-01 Thread Cyrille
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+ )?

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

2020-02-01 Thread Maxwell Murunga
Greetings Saints, I'm processing an OSIS Commentary in InDesign using GREP: *Find: *((\d+ )?(\w+?.? \d+[:]\d+)(.\d+)?([, \d]+(.\d+)?)*) *Replace:* $1 It partially accomplishes the task, but does not automatically convert the book names to the standard OSIS abbreviations. I also need help in figu