Organising The Bible in Obsidian

@Joschua Thanks so much for replying! Thank you in general for everything that you’re doing :innocent:

So I installed cliclick in /usr/local/bin. Now the error is gone, but the script is doing things I don’t think it’s supposed to, clicking and typing on the wrong areas of the screen it seems like. I think it has to do with which apps’ windows are open and the difference in our screens’ sizes (??). At the end, it didn’t seem to finish the job, and it reinforced the idea that idrk what I’m doing lol.


But putting that aside, I do look forward to the Script 2.0, as you said that you’ll possibly provide the option to change translations, but I also think that the 1-note per chapter idea is better than having 1 note per book, overall it looks more polished than your initial script.

With that, perhaps also consider making an MOC/index for each book linking all of the chapters contained in that book. I believe this somewhat combines the ideas of having 1-note/chapter and 1-note/book. I also believe that by having an index, there’s the option to give a description of what each book is about idk. What do you guys think? I don’t really know how useful this would be, but it’s an effort to make the text more organized i guess.

Generally speaking, the chapter breaks are decent at delineating between topic/story/theme. Finding similar passages will generally be by chapter. For example, looking at the story of Abraham and the story of Isaac, you will see that they paralell each other (which the author uses to point out some interesting things :slight_smile: ) This is easily seen when chapters line up to each other. Ch 20 and 26 will have lots of links in common. Ch 21 and 27 will also have links in common etc.

I didn’t initally set that up because I haven’t decided how I want to display everything in the actual text. Primarily because I have the Masoretic Text and the LXX interliniear for each verse. Right now I have those at the bottom and can link to them, but I’m looking at a good way to use them that allows both word/concept study and reading. I’ll post the CSS and screenshots when I’m done, but you can use the following to edit the verse numbers in normal md preview panes:

.markdown-preview-section .h6{
 code goes here
}

How do I import text? I type it. By hand.
This is because I value the time spent with the Text. If I just read through things, my brain will gloss over things that I don’t have context for.

When reading a genealogy or historical account, my brain goes “ok so some weird name was the father of some other weird name and he was the father of some other weird name and-- oh hey there’s a guy I know-- and more weird names…”

When I have to take the time and make sure I’m spelling something correctly I find I have that “I’ve seen this name/place/number/etc before” moment a whole lot more often.

2 Likes

Script 2.0

I am glad to share it now! You can find the full script in this pastebin here but I will comment on some specifics of the code. Now it runs way more reliably, saves by chapter into a folder containing the whole book. I also added Navigation on the top and bottom of the notes. Using it, I imported the Bible in a night and an afternoon :smile:

Before Running the Script

  • Install Atom. Any TextEditor works but I optimised it for Atom
  • Install CliClick. This tool emulates mouseclicks

What the script does

  1. In Safari, it opens a chapter on biblegateway.com in print view (so that there is less to clean up)
  2. It copies and pastes the webpage into Atom
  3. Using find and replace mechanisms, it deletes the additional text.
  4. It formats the text into an Obsidian-compatible format and adds Navigation on the top and bottom.
  5. It saves each chapter in a separate file and creates a new folder for each book of the bible.

Setting up to import

  • Before running the code, make sure you disabled Footnotes and Headings on biblegateway.com. The script is not compatible with that.
  • The script chooses the top folder in your favourites bar as the parent folder to save the book folders in. Make sure you set that accordingly.

  • Set the mouse coordinates correctly. Via Command-Shift-4 you can find the coordinates. The upper coordinate is X, the lower Y.
    • Clicking into the Atom text field: set textX to 53, set textY to 86
    • Toggling Regrex search: regX to 1121, set regY to 674. In Atom, press Command + F to open the search field. In the top right, find the “.*” button and set it’s coordinates.
    • Pick folder to save in: set folderX to 290, set folderY to 201. In Atom, press Command-Shift-A to open the “Save as”-Dialogue. Pick the coordinates of the top folder of the favourites bar.
    • Creating a new folder: set newX to 285, set newY to 470. In the “Save as”-Dialogue in Atom, note the coordinates of “New Folder” in the bottom left.

Commentary on the code

Options

set shutdown to false -- Do you want your Mac to shut down after importing?
set savedialog to true -- Choose if you want to display a dialog asking you to save each chapter. For longer books I found that helpful to be able to exit out. It has a timeout of 5 seconds if you don't bother picking an option.
set bigdialog to false -- Choose if you want a dialog to display after exporting a book
set dialogchosen to false -- Choose if you want a display showing you the books you're about to import

Delays

In the code, you can set the delays according to your internet connection and computing power. When choosing very low delay, I would recommend enabling the option of a dialogue to exit the program. You don’t want your Mac to be stuck on the script without being able to abort.

Abbreviations

In the “book information” list, you can pick different abbreviations.

A note on translations

I chose to import the ESV. You can pick a different translation in the code:

set translation to "ESV" -- pick your translation

Just make sure to optimise the find and replace process of deleting unwanted information.
When copying from the ESV, it copies the following blurb as well:
English Standard Version (ESV)
The Holy Bible, English Standard Version. ESV® Text Edition: 2016. Copyright © 2001 by Crossway Bibles, a publishing ministry of Good News Publishers.

Using find and replace I made sure to delete that unwanted text:

keystroke "f" using command down
			keystroke "The Holy Bible, . ESV® Text Edition: 2016. Copyright © 2001 by Crossway Bibles, a publishing ministry of Good News Publishers."
delay DelayShort
key code 48 -- tab
delay DelayShort
keystroke "a" using command down
key code 51 -- delete
delay DelayMed
key code 36 using command down --enter

When copying from a different translation, you need to adjust the text to replace accordingly.

Current pitfalls

The Psalms are formatted differently to the other books. Therefore I haven’t been able to import them using the script yet. I might share a later compatible script. It has a description and allows me to jump into the first chapter.

Overview notes in Obsidian

In the navigation on the top and bottom I included a link to an overview note/MOC.

The script formats the overview notes with an underscore, so that it appears at the top of the folder. Because my navigation is more based on links and less on folder, I actually deleted the underscores in my vault. So feel free to use it to your liking :smile:

As always, feel free to reach out to me if you run into problems. I really appreciate the interest.

5 Likes

Thank you so much for this script! I’d say you’re doing your part in the building of the Kingdom :wink:

I did notice that the script was unable to format the text properly. The regex thing was unable to add the headings before each verse. Luckily I somehow fixed it. I think there was a mistake in the script???

The problem was with this line:
key code "26" using {shift down, option down} -- write "\"
The key code seems to type instead of \,
so when finding from the text copied from the Bible: ([0-9]|[1-9][0-9]|100)
no results would appear because it gets typed as ([0-9]|[1-9][0-9]|100)‡s instead of ([0-9]|[1-9][0-9]|100)\s.
Consequently, Atom fails to replace the verse numbers with headings.

Thankfully, your comment -- write "\" gave me a hint as to what needs to be typed. After a bit of searching, I was able to fix the problem by changing the line to:
key code "42" -- write "\"
which now types \ instead of
I then find-and-replaced the other parts from the script that contained the line.


On another (and probably a bit controversial) note, I also added the option to include the 7 deuterocanonical/apocrypha books. I had to search the abbreviations for those books to add them.


Again, thanks so much for this @Joschua! I’ve been meaning to get into studying the Bible lately (with Obsidian) but don’t quite know how I should do it.

How do you guys go about studying the Bible? What is your workflow? And how do you take notes?

2 Likes

Haha, thank you! I am very glad this is of help to some one :slight_smile:

Good on you for fixing the script! I am quite sure this is due to me using key codes for my German keyboard that don’t correlate to the same symbols on other keyboard layouts. Glad you were able to change the script to make it work.

Great! Now the script is even more complete :smile:


So far, my workflow is mostly engaging with Scripture through other content. Whenever I listen to a sermon or pick up a reference to a scripture, I’ll write a note in Obsidian an link it.

I have been very inspired by @Lithou though to use Obsidian to engage directly with scripture. (So @Lithou, please feel free to share more! :smile:) To have understanding emerge from me spending time with the Spirit and Scripture.

So now I am thinking about implementing practices to engage with the text within Obsidian. Since I haven’t imported the Psalms yet I am thinking about copying a Psalm each day as a part of my daily-ish morning journaling. That seems like a good way to start the day spending time with Scripture and God’s presence. To value the time spent with the Text.

4 Likes

Take this with a grain of salt as I’m not religious nor have I studied the bible. But it serves as an interesting case study for knowledge management because of its age and widespread use.

The way you do it with headers seems excessive to me and breaks you out of the flow of reading it? The way I’d do it is just keep it in the paragraph form and excise a note and link to it when you find a line you decide to connect to other lines or write commentary on. I did a quick couple of notes to how it’d look in my mind

either of these

Or instead of links you could turn the lines into just straight up embeds that could be clicked, but for that to work and keep the flow you’d have to alter the CSS of embeds to be naked embeds and minimalist.

3 Likes

I love getting the input from those who aren’t religious or students of the Text. I find you have perspectives on things that the rest of us are blind to. Rabbi Fohrman calls this the lullaby affect. We hear a story so much growing up that we take things for granted until someone hears the story for the first time and points out “Hey, isn’t it that a little weird?”

So with your approach, you add the center note for any verse(s) you are annotating? Then you copy the text in plus add any embed from external sources like a third party commentary (the righthand pane) or quotes from another book, etc?

I love your point that paragraphs might be a better division within each file. When I memorized passages, I didn’t do verse numbers, just chapters and paragraphs (or paragraph sections for places where each sentence is it’s own paragraph.) For example, Romans 16 was 4 “Paragraphs”/sections. I think I’ll try this out for a bit and see how it goes.

If you use designations for each, it would make sense to embed the full paragraph/section even if you were referring to a specific verse within that section.

Also, if you wanted to do something unique, you could just copy/paste the portion you wanted into a block quote with a link at the end to the section in which it is located.

Wouldn’t this create a file for each embed that you did? While it would start out fine, I think it could grow cumbersome rather quickly. Depends on what use case you have though. I personally would avoid it because I create embeds for proper nouns and concepts so that will probably interfere.

1 Like

@Lithou yes it would create a file for each embed that you did. But I would only create embeds for lines that you plan to write more on or connect to others.

Also it doesn’t seem too excessive. Wikipedia tells me there are " 31,102 verses" in the Bible. Luhmann had 90,000 notes by the time he was done. So you could have a note for each verse in the bible and then a bunch of connecting notes for each verse.

1 Like

I really appreciate your input, @lizardmenfromspace. It was my hope that other people from the PKM community would find it an interesting case study.

On headers and readability: With a bit of rudimentary CSS tweaking1 , I was able to create a reading experience that is totally fine for me.

I do love though that in your approach you can quickly see the verses you already have other notes on. Until there is an indication for linked headings, it is hard to see on which verses you might have notes on. Having a consolidated “Commentary” section on each verse is also very helpful.

I definitely see the benefits of this approach, I am just hesitant to go through the effort of importing and formatting the Bible again :sweat_smile: How did you create the superscripted verse numbers? Did you format them manually/via regrex or were you able to copy and paste the format?

This system also introduces just a tiny bit more friction for a new reference. Currently, typing [[Eph-1#8]] does the job. In the other approach after creating a new [[Ephesians 1.8]] reference, I would have to go back to the paragraph to add that link, right?

Again, thanks for your input. I can really see the benefits of this approach and I am on the fence of changing my whole system. :smiley:


1: In case it is helpful to someone, here is the code. If someone would be willing to help me out in how to get rid of the space after each verse, I would really appreciate it!

.markdown-preview-view h6
{
  position: relative;
  left: -3%;
  top: 26px;
  line-height: 0px;
  margin-top: -20px;
  margin-right: 3px;
  font-family: var(--font-family-preview);
  font-weight: 500;
  font-size: 10px;
  font-weight: bold;
  color: var(--text-faint) !important;
}
6 Likes

Hello everyone, I am glad that I found this discussion here, although what I am working on is the Quran.

I just imported the whole Quran into Obsidian, 114 chapters and 6236 verses. Currently each verse is an .md file, but I am looking for ways to organize it better.

Thank you so much for writing in details on how you use Obsidian to organize the Bible, I will try some of the ideas here!

7 Likes

First off, thanks selfire for the applescript! Although I have 0 experience with scripts of any kind, the tutorial post and clear comments helped me to get the export done.

Now that I have the Bible in my vault, I have a couple of improvements in mind:

  1. as you mentioned, the ability to remove space between lines would be phenomenally helpful for readability.
  2. Would it also be possible to denote paragraphs?
  3. This is probably impossible, but having the verses joined together in a single line when they form a single sentence would be so good.

Thanks again!

Thank you.

Hey @tpmiap! So glad it worked for you even without any prior experience.

On (1): Yes, that would be really helpful. The CSS solution to that is way beyond me but I will try to reach out to some people more experienced than me and will share if there is a solution!

EDIT: margin-top: -20px; did the trick!

On (2): I guess a way to denote paragraphs would be with a heading. I could see how that would be possible with some advanced regex but it is a way beyond me. (and for me the experience so far is fine)

On (3): I guess a solution to both (2) and (3) would be @lizardmenfromspace’s approach. I guess you could tweak the script in a way that imports the Bible in a more similar fashion to his approach. For me, creating a new note for each reverenced verse and linked back to it is a bit too much work right now. If you’re happy to have a go at it, I’d help if you get stuck though! :slight_smile:

1 Like

Hi @Joschua, thanks for the response! Yes, the experience (and utility) is indeed much better than if I did not have the Bible in Obsidian at all. For now, I relate to your concerns with @lizardmenfromspace’s approach and will likewise stick to what I have. (Also because finding my way around applescript was quite the baptism by fire, despite all the great help and documentation you provided.)

edit: Just tried margin-top -20px; !! Wow - really makes me want to pick up CSS. Thanks :slight_smile:

1 Like

Dave Gifford is a Tiddlywiki developer who has been doing some great work based on Roam principles. He’s also a missionary in Mexico, and has been working on organizing the Gospels in Tiddlywiki. You can see his project at https://giffmex.org/html/evangelios/Pasajes%20en%20Mateo.html (in Spanish). There’s a Youtube interview with him at https://www.youtube.com/watch?v=cvLHjwYJfA4 . He talks about the Gospel project near the end.

4 Likes

It’s great. Would you like to show how you organize the Quran in detail? Maybe it’s great if creating new forum about organizing Quran in Obsidian (I’m not ready yet to start the forum, since my Quran organization is not stable yet :sweat_smile:).

2 Likes

Hi @Joschua, I’ve just been looking through the forums and thought of something that would improve our abilities to link notes to verses. Unfortunately, I don’t have the technical ability to execute.

Right now, if I want to embed or refer to a chunk of verses, for example, John 3:16-20, I have to manually type the links for each of the verses. I suspect that Keyboard Maestro might be able to solve this inconvenience with a macro that takes input like “John 3:16-20” and pastes links for the verses into the clipboard.

What do you think of this idea? Further, do you know of anyone who could make this happen?

2 Likes

Oh, that’s a good idea. I’m not super familiar with keyboard maestro, but that concept is doable with basic level of programming since you have a small, finite amount of books (would have to figure out syntax between 1 Cor 10:1-2 , I Cor 10:1-2, 1 Corinthians 10:1-2, etc) and be ok with edge/corner case references. If you didn’t have any chapter/book jumps like Gen 1:20 - 2:5 you should be able to do that quite quickly.

That’s a great idea indeed! I am also not so familiar with Keyboard Maestro; I use espanso.

This is something I have been thinking about for a bit and if there’s enough time I might look into whipping up a rough solution.

I played around with Keyboard Maestro for a bit but couldn’t find my way around the problem. I’ll give it another go when I have more free time. Thanks :slight_smile:

1 Like

I use KM a hundred times a day, and would be happy to help troubleshoot. Also very interested in this particular forum topic.

Shoot me something specific to figure out with KM and I’d quickly become obsessed with it as a puzzle that needs solving. Just let me know what you want to do.

2 Likes