Jump to content

Please read the Forum Rules before posting.

Photo

Script/Macro to Append Book Name to Verse References


  • Please log in to reply
9 replies to this topic

#1 gtealw

gtealw

    e-Sword Supporter

  • Veterans
  • PipPipPip
  • 43 posts
Offline

Posted 08 April 2018 - 01:48 PM

Hi,

 

I am trying to convert a commentary that is in HTML format (see attached sample). The problem is that the verse comments don't have the name of the book. However, the name of the book is mentioned at the beginning (line/record). For example,

 

Annotations for Matthew

1:1 genealogy of Jesus. “The book of the genealogy”

1:2 Abraham . . . Isaac . . . Jacob. 

1:3 Tamar. Ancient genealogies often omitted women. 

1:5 Rahab. Because Rahab joined Israel,

etc.

 

Annotations for Mark

1:1 good news about Jesus the Messiah.

1:2–3 In both of these Biblical quotations,

1:4 wilderness. The wilderness was a place of hardship,

etc.

 

Does anybody have a suggestion of how to implement an algorithm that searches for the "Annotation for" <bookname> and uses the bookname variable and adds "÷<bookname>" to the verse reference (e.g. ÷Matthew 1:1) until it reaches the next "Annotation for" and updates the bookname variable, and so on for all 66 books of verse comments (~10,000).

 

I am using a Windows PC and have a working knowledge of grep, sed, and awk and do most of my editing in Notepad++.

 

I appreciate any suggestions.

 

Blessings,

 

Andre

 

 

 

Attached Files



#2 Tj Higgins

Tj Higgins

    e-Sword Fanatic

  • Members
  • PipPipPipPipPip
  • 458 posts
Offline

Posted 08 April 2018 - 04:16 PM

Hi,

 

I am trying to convert a commentary that is in HTML format (see attached sample). The problem is that the verse comments don't have the name of the book. However, the name of the book is mentioned at the beginning (line/record). For example,

 

Annotations for Matthew

http://www.biblesupp...ooltip-tool-nt/



#3 gtealw

gtealw

    e-Sword Supporter

  • Veterans
  • PipPipPip
  • 43 posts
Offline

Posted 08 April 2018 - 06:10 PM

I guess I forgot to mention that I am preparing this HTML file to be used by T4 (e-Sword ToolTip Tool NT) to generate the commentary.



#4 Tj Higgins

Tj Higgins

    e-Sword Fanatic

  • Members
  • PipPipPipPipPip
  • 458 posts
Offline

Posted 08 April 2018 - 06:14 PM

I guess I forgot to mention that I am preparing this HTML file to be used by T4 (e-Sword ToolTip Tool NT) to generate the commentary.

 

If you simply copy and past the text from the html file into E-Sword Tooltip you can do any all editing in Tooltip no need to prep anything at all



#5 gtealw

gtealw

    e-Sword Supporter

  • Veterans
  • PipPipPip
  • 43 posts
Offline

Posted 08 April 2018 - 07:53 PM

As stated, I need to place the book name with marker in front of all 10,000+ scripture references.

 

From this: 1:1 genealogy of Jesus. “The book of the genealogy”

to this: ÷Matthew 1:1 genealogy of Jesus. “The book of the genealogy”



#6 Tj Higgins

Tj Higgins

    e-Sword Fanatic

  • Members
  • PipPipPipPipPip
  • 458 posts
Offline

Posted 09 April 2018 - 10:38 AM

As stated, I need to place the book name with marker in front of all 10,000+ scripture references.

 

From this: 1:1 genealogy of Jesus. “The book of the genealogy”

to this: ÷Matthew 1:1 genealogy of Jesus. “The book of the genealogy”

 

And as I said the "Fill In" tool in e-Sword Tooltip can accomplish this with ease, the "Fill In" tool has its own menu of option to make filling in things like book names as easy as possible. You can even fill in the marks that Tooltip uses in creating modules if necessary. You can find detailed information on Tooltip's "Fill In" tool in the Tooltip Users Manual starting on page 104. The manual explains all of the options available when using the "Fill In" tool in detail. Personally I have used the "Fill In" tool in creating bible modules to add the book names before bible verses for entire books of the bible with as I said previously just a couple of mouse clicks. 

 

 

Here is an image of the menu:



 

Attached Files


Edited by Tj Higgins, 09 April 2018 - 10:38 AM.


#7 gtealw

gtealw

    e-Sword Supporter

  • Veterans
  • PipPipPip
  • 43 posts
Offline

Posted 09 April 2018 - 03:40 PM

Wow! Thanks for the suggestion. "Fill-in" is very powerful for what I needed.

 

Do you have any suggestions on how to save the file after running the fill-in command? I have no problem opening a .docx file but after I make any changes I can't save it because of "insufficient memory",

 

Thanks for your help.



#8 Tj Higgins

Tj Higgins

    e-Sword Fanatic

  • Members
  • PipPipPipPipPip
  • 458 posts
Offline

Posted 09 April 2018 - 04:07 PM

Wow! Thanks for the suggestion. "Fill-in" is very powerful for what I needed.

 

Do you have any suggestions on how to save the file after running the fill-in command? I have no problem opening a .docx file but after I make any changes I can't save it because of "insufficient memory",

 

Thanks for your help.

 

Files opened in Tooltip have Should be saved as RTF files as Tooltip converts the RTF file to e-Sword modules when creating module files



#9 gtealw

gtealw

    e-Sword Supporter

  • Veterans
  • PipPipPip
  • 43 posts
Offline

Posted 20 April 2018 - 10:17 AM

Hi TJ et al.

 

Since you helped with me with my book fill in issue, I thought I would see if someone has a solution to something more challenging.

 

I have a commentary which is broken into sections with chapter and verses. Within each section are verse numbers with no book or chapters indicated. I would like to add the chapters to the verse numbers (e.g. 1 becomes 1:1, 5-6 becomes 1:5-6).

 

Below is a sample of the commentary. I would appreciate any suggestions on how to quickly add the chapters to the verse numbers.

 

iii. The visit of the Magi (2:1–12)

1Jesus was born before the death of Herod the Great, which is probably to be dated in 4 BC; the exact date of Jesus’ birth is unknown.

 2. There are several ancient accounts, pagan and Jewish, of stars heralding the birth of great men (see Brown, pp. 170–171).

3–4. Herod’s concern is understandable: as an Edomite (cf. Mal. 1:4) and a Roman appointee, he was vulnerable to the claims of a king of the true Davidic dynasty.

5–6. The answer to Herod’s question was well known; cf. John 7:41–42. Matthew introduces here his second formula-quotation (see pp. 42–43; the absence of the phrase ‘that it might be fulfilled’ is due to the insertion of the quotation into the Jewish leaders’ answer rather than into a narrative of the birth in Bethlehem).

7–8. It is sometimes alleged that the historical …

 

i. The ministry of John the Baptist (3:1–12)

1In those days relates directly to 2:23, the days of Jesus’ residence in Nazareth. It is a vague expression (compared with Luke’s precise dating, 3:1),

2. Matthew (alone) summarizes John’s preaching in the same words as that of Jesus (4:17; cf. also 10:7 for the preaching of Jesus’ disciples). For other parallels see on vv. 7, 8, 9, 10 and 12. For Matthew,

3. While not strictly a ‘formula-quotation’ (pp. 42–43; it is shared with Mark and Luke, and lacks the ‘fulfilment’ terminology), this quotation of Isaiah 40:3 serves a similar function. John’s location in

4. John’s ascetic clothing is modelled on that of Elijah (2 Kgs 1:8), whom John also resembles in his sudden appearance, his solitary life, his uncompromising message and his eventual clash with the ‘king’

5–6. John’s baptism was an innovation. The nearest contemporary parallels are the self-baptism of a Gentile on becoming a proselyte, and the repeated ritual washings (also self-administered) at Qumran.

 

 

 



#10 Tj Higgins

Tj Higgins

    e-Sword Fanatic

  • Members
  • PipPipPipPipPip
  • 458 posts
Offline

Posted 20 April 2018 - 10:48 AM

Hi TJ et al.

 

Since you helped with me with my book fill in issue, I thought I would see if someone has a solution to something more challenging.

 

I have a commentary which is broken into sections with chapter and verses. Within each section are verse numbers with no book or chapters indicated. I would like to add the chapters to the verse numbers (e.g. 1 becomes 1:1, 5-6 becomes 1:5-6).

 

Below is a sample of the commentary. I would appreciate any suggestions on how to quickly add the chapters to the verse numbers.

 

iii. The visit of the Magi (2:1–12)

1Jesus was born before the death of Herod the Great, which is probably to be dated in 4 BC; the exact date of Jesus’ birth is unknown.

 2. There are several ancient accounts, pagan and Jewish, of stars heralding the birth of great men (see Brown, pp. 170–171).

3–4. Herod’s concern is understandable: as an Edomite (cf. Mal. 1:4) and a Roman appointee, he was vulnerable to the claims of a king of the true Davidic dynasty.

5–6. The answer to Herod’s question was well known; cf. John 7:41–42. Matthew introduces here his second formula-quotation (see pp. 42–43; the absence of the phrase ‘that it might be fulfilled’ is due to the insertion of the quotation into the Jewish leaders’ answer rather than into a narrative of the birth in Bethlehem).

7–8. It is sometimes alleged that the historical …

 

i. The ministry of John the Baptist (3:1–12)

1In those days relates directly to 2:23, the days of Jesus’ residence in Nazareth. It is a vague expression (compared with Luke’s precise dating, 3:1),

2. Matthew (alone) summarizes John’s preaching in the same words as that of Jesus (4:17; cf. also 10:7 for the preaching of Jesus’ disciples). For other parallels see on vv. 7, 8, 9, 10 and 12. For Matthew,

3. While not strictly a ‘formula-quotation’ (pp. 42–43; it is shared with Mark and Luke, and lacks the ‘fulfilment’ terminology), this quotation of Isaiah 40:3 serves a similar function. John’s location in

4. John’s ascetic clothing is modelled on that of Elijah (2 Kgs 1:8), whom John also resembles in his sudden appearance, his solitary life, his uncompromising message and his eventual clash with the ‘king’

5–6. John’s baptism was an innovation. The nearest contemporary parallels are the self-baptism of a Gentile on becoming a proselyte, and the repeated ritual washings (also self-administered) at Qumran.

Here again you can use the fill in tool in e-Sword Tooltip to do what you want by selecting each commentary section and then using the fill in option "beginning of selected paragraphs" to add the 1:, 2: or whatever chapter number you need to add. Make sure each verse reference is its own paragraph with a paragraph marker at the end of the verse's text






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users




Similar Topics



Latest Blogs