Jump to content

Converting a commentary to User Notes


jlm

Recommended Posts

I'd like to let the Accordance community know about something I'm slowly working on. I'm converting an old public domain commentary into User Notes so that it will scroll with the text. Accordance doesn't offer a way to create a User Reference Tool, but the User Notes import can be used to achieve something similar.

 

I'm preparing the text in Markdown. First level headings are books, second level headings are chapters, and third level headings are verses. A Python script reads the Markdown (treating it as plain text) and splits it at third level headings (the commentary on a verse or verses). The chapter heading becomes the name of the file ("### Luke 2:14" becomes "Luke 2_14.rtf") and the content is created by piping the Markdown through pandoc.

 

Since I found the commentary online in HTML and got permission to convert it for Accordance, I just have to add the third level headings to split it into verses and enhance the text as I wish. I'm tagging Scripture references and sometimes marking page numbers, chiefly for proofreading.

 

If at some point in the future Accordance does support the creation of User Reference Tools, I already have the text prepared and just have to convert it into whatever the importer will read.

 

There are some limitations to using User Notes for a commentary: RTF import doesn't support footnotes or small capitals, but in the text I'm converting, footnotes are rare and small capitals are not necessary for understanding the text.

 

A commentary in User Notes has the advantage on iOS that it will pop up in a little window if you tap on the icon, so you can have a main text, something that scrolls in parallel, and also see the commentary. However, having lots of commentaries in this form would not be ideal, because all the user notes share icons (distinguished for one note or multiple notes on the verse), and they all pop up together or show up in instant details together.

  • Like 7
Link to comment
Share on other sites

  • 6 months later...

This sounds FABULOUS. I would love to get an update on this or even access to your Python Script, an example of the text you prepared and your Pandoc settings. I'm trying to turn something pretty simple like this into a user note that will scroll parallel to my Bible:

 

Matthew 1:1 [user note heading - where it scrolls to]

Genesis 5:1 [user note content]

 

Matthew 1:2 [user note heading - where it scrolls to]

1 Chronicles 1:34 [user note content]

 

Matthew 1:3 [user note heading - where it scrolls to]

Ruth 4:12

 

Matthew 1:3 [user note heading - where it scrolls to]

Ruth 4:18–19 [user note content]

 

Matthew 1:3 [user note heading - where it scrolls to]

1 Chronicles 2:4–5 [user note content]

Link to comment
Share on other sites

I've made the code publicly accessible as a git repository: https://gitlab.com/jlmp/acc-great-commentary

At that address you can browse and download the code. I updated the README to explain how it works.

 

You could make the notes with a Markdown text file something like this:

### Matthew 1:1
Genesis 5:1

### Matthew 1:2
1 Chronicles 1:34

That will get the text into the notes, but the Accordance User Notes importer does not automatically link verse references. You have to tag them yourself. This would work:

### Matthew 1:1
[Genesis 5:1](Genesis 5:1)

### Matthew 1:2
[1 Chronicles 1:34](1Chronicles 1:34)

If you find it tedious to repeat the citations and can write a pandoc filter in Lua or Python, you could prepare the Markdown like this:

### Matthew 1:1
[Genesis 5:1]{.vref}

### Matthew 1:2
[1 Chronicles 1:34]{.vref}

and then write a filter that looks for spans with the vref class and transforms them into links, using Lua patterns or regular expressions to reformat the reference as necessary: no space between book number and name, hyphens instead of en dashes, etc.

 

Edit: I've noticed you have multiple entries for Matthew 1:3. My script (mkRTFnotes.py) won't handle that. You need to combine the content into a single note:

### Matthew 1:3
Ruth 4:12

Ruth 4:18–19

1 Chronicles 2:4–5

Alternatively, use my script as a model to write your own that reads whatever format it's easy for you to generate, combines the references, and pipes Markdown (with verse references linked) into pandoc to produce the RTF files.

Edited by jlm
  • Like 3
Link to comment
Share on other sites

  • 3 years later...
On 3/26/2019 at 12:44 AM, jlm said:

I'd like to let the Accordance community know about something I'm slowly working on. I'm converting an old public domain commentary into User Notes so that it will scroll with the text. Accordance doesn't offer a way to create a User Reference Tool, but the User Notes import can be used to achieve something similar.

 

I'm preparing the text in Markdown. First level headings are books, second level headings are chapters, and third level headings are verses. A Python script reads the Markdown (treating it as plain text) and splits it at third level headings (the commentary on a verse or verses). The chapter heading becomes the name of the file ("### Luke 2:14" becomes "Luke 2_14.rtf") and the content is created by piping the Markdown through pandoc.

 

Since I found the commentary online in HTML and got permission to convert it for Accordance, I just have to add the third level headings to split it into verses and enhance the text as I wish. I'm tagging Scripture references and sometimes marking page numbers, chiefly for proofreading.

 

If at some point in the future Accordance does support the creation of User Reference Tools, I already have the text prepared and just have to convert it into whatever the importer will read.

 

There are some limitations to using User Notes for a commentary: RTF import doesn't support footnotes or small capitals, but in the text I'm converting, footnotes are rare and small capitals are not necessary for understanding the text.

 

A commentary in User Notes has the advantage on iOS that it will pop up in a little window if you tap on the icon, so you can have a main text, something that scrolls in parallel, and also see the commentary. However, having lots of commentaries in this form would not be ideal, because all the user notes share icons (distinguished for one note or multiple notes on the verse), and they all pop up together or show up in instant details together.

 

This sounds really great!

Would it be possible to have a YouTube demo for the people who have ideas about coding?

Thanks for your generosity in sharing this great idea.

 

 

  • Like 2
Link to comment
Share on other sites

On 12/27/2022 at 8:16 AM, Mutien Chen said:

 

This sounds really great!

Would it be possible to have a YouTube demo for the people who have ideas about coding?

Thanks for your generosity in sharing this great idea.

 

 

I'm afraid I don't have time to make a video now. If I do so, it would probably be at least a month from now before I could start working on it.

 

However, by that time, Accordance 14 will hopefully e debugged, and it has a new way to make a commentary: you can make a Commentary User Tool and convert it to a Reference Tool. The Reference Tool can then be added as a parallel just like any other commentary. So it won't be necessary to use User Notes for making your own commentary.

Link to comment
Share on other sites

Thanks a lot, I can imagine it will take a lot of time recording a video, just forget about it. I will wait for Acc 14 released the full functions of User Tools. Currently it's not possible for me to import unicode pdf without crashing after few minutes working in Acc. Even it's not functional to create a user commentary. 

 

 

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...