Notes workflow for Biblical texts

I would like to have each Bible verse in a text file and wiki link (or DT link) notes to specific verses. I would not need to keep all my notes in one place but when looking at a verse/chapter, I could search for all notes linking to that verse.

Is there a better way to do this? Would you have other suggestions?

Along these lines: Do you all know a way to extract the text of the Bible into 1 verse per text file? The files would then be input into groups (per chapter, per book).

All thoughts are welcome!

Sounds like a job for grep and sed, if you’re a command line kinda guy. You’ll need a plain text version of the bible that has each verse number consistently delimited in the text.

Although I’d rather spend a day searching for someone who has already done this, as clearly there are data sources that have already split it out, as evident by sites like this: Genesis 2:1 Thus the heavens and the earth were completed in all their vast array.

1 Like

You can do this easily with Nisus Writer Pro. I did this already with sites from Bible Hub.

Copy the text and paste into a new Nisus document. Save the document to the Desktop. Then run the following macro:

The last line in the macro refers to a macro called SplitDocument which ships with Nisus Writer. The other lines are from me.

Nisus automatically creates a folder where you saved the file and assigns each file in the folder a number which corresponds to the verse number.


The great thing is that Nisus preserves the hot links from the original site, so that clicking on a verse number in Nisus takes you directly to a site with numerous other translations.

I don’t know whether splitting the verse and the corresponding notes into multiple files is a good idea. Why not keep the notes in the same file as the verse? While keeping the files in DEVONthink, I assume you would write and edit the notes in Nisus, so with bookmarks (in Nisus) you should be able to quickly jump from a verse to a note (in the same file) and back again…
You can also give each note a name and assign it a (hierarchical) level which will be reflected in the Navigator (= outline); then you just need to click on the name in the Navigator to jump to the note.

And I almost forgot, Nisus Writer can also create Concordance Lists !!!

1 Like

I found this text file
and would use an Applescript to split into separate verse files


Ge1:1 In the beginning God created the heaven and the earth.
Ge1:2 And the earth was without form, and void; and darkness was upon the face of the deep. And the Spirit of God moved upon the face of the waters.
Ge1:3 And God said, Let there be light: and there was light.
Ge1:4 And God saw the light, that it was good: and God divided the light from the darkness.
Ge1:5 And God called the light Day, and the darkness he called Night. And the evening and the morning were the first day.
Ge1:6 And God said, Let there be a firmament in the midst of the waters, and let it divide the waters from the waters.
Ge1:7 And God made the firmament, and divided the waters which were under the firmament from the waters which were above the firmament: and it was so.
Ge1:8 And God called the firmament Heaven. And the evening and the morning were the second day.
Ge1:9 And God said, Let the waters under the heaven be gathered together unto one place, and let the dry land appear: and it was so.
Ge1:10 And God called the dry land Earth; and the gathering together of the waters called he Seas: and God saw that it was good.
Ge1:11 And God said, Let the earth bring forth grass, the herb yielding seed, and the fruit tree

Since I’m far from being AppleScript fluent, how would such a script look like?

Please provide details on how you want the verses presented
For example, give us the filenames and contents for the first 5 files

Here is a version that operates on the kjv.txt file in the current group in DEVONthink.
It creates a plain text file with the address as the name and the verse as the content.

set od to AppleScript's text item delimiters

tell application id "DNtp"
	set cg to current group
	set theFile to child "kjv" of cg -- This assumes you have the kjv.txt file in the current group
	set src to plain text of theFile
	set AppleScript's text item delimiters to " " -- Split on spaces
	with timeout of 3600 seconds
		repeat with theLine in (paragraphs of src)
			set {address, verse} to {text item 1, text items 2 thru -1} of theLine -- Grab the first item – the verse address
			create record with {name:address, content:verse as string, type:text} in cg -- Create a plain text record with the address as the name and the address and verse 
		end repeat
	end timeout
	set AppleScript's text item delimiters to od -- Reset the delimiters	
end tell

Bear in mind, this will take a considerable amount of time as it’s generating thousands of individual files. In fact, it would be wiser to handle this in smaller batches, e.g., …

repeat with theLine in (paragraphs 1 thru 1000 of src)

… then change it to 1001 thru 2000, etc.

1 Like

As always, I continue picking up most useful tips from your scripts. No longer will one of my scripts die when I’m distracted: thank you!



Just for the record: A JavaScript version runs in about 350 seconds, i.e. 6 minutes. No need to set a timeout. The processing without creation of records took 101 milliseconds, whereas the AppleScript version was still running after 5 minutes (I stopped it then).

(() => {
  const app=Application("DEVONthink 3");
  const group = app.createLocation('Bibel', {in : app.databases['Test']});
  kvt.split('\n').forEach(line => {
    [address, verse] = line.split(/( .*)/);
    const r = app.createRecordWith({name: address, content: verse, type: "txt"}, {in: loc});

There’s a problem with using address unmodified as the records’ name: The addresses contain colons, which are supposedly not a good idea in record names. OTOH, I guess that the colon is indispensable for bible people (I’m not one of them).

In any case, rather than waiting for AppleScript to terminate, I’d use the JavaScript code.

Well, I’m really just trying to figure out the best workflow to keep various notes (journal, teaching, sermons, highlights from books) linked back to specific passages, perhaps with wikilinks to help fuel future teaching. Maybe not splitting the Biblical text into each verse is the best way to do this. I’m sure others are doing something similar to this. Perhaps I should just rely on the search function?

I’m a pastor. I used DTP to hold all my notes etc. I do something similar and it works for me. I’ve developed a tag for each book of the Bible - e.g. “49 - Ephesians.” When I have note that a specific text I title it “Ephesians 1:2 - description,” and add the appropriate tag. When I do a search I use the book tag and scan the titles. I suppose you can develop a tag for each chapter of the Bible.

Thanks! Yes, using tags could work. And it might be the easiest method. I was hoping to automate linking a bit more. But maybe the tinkering isn’t worth the time.