Organising The Bible in Obsidian

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

Thanks for sharing. I think this is the method I’d prefer for Bible study. Do you mind elaborating on this a little?

I’m new to Obsidian in the last few weeks, so some of the embedding and linking features get lost on me.

Hi! Thanks for responding. I’m trying to figure out how to use KM to simplify the process of linking to chunks or swathes or verses. Right now, each chapter of the Bible has its own md note, and each verse is a H6 heading. This means that referring to multiple verses requires typing links multiple times.

So for example, if I’m trying to link to Luke 11:27-30, I don’t want to have to write
“[[Luke 11#27]] [[Luke 11#28]] [[Luke 11#29]] [[Luke 11#30]]” manually. Ideally I’d like a KM macro that allows to type something like “Luke 11:27-30” and output the links.

I’d greatly appreciate if you could make that work!

@tpmiap Almost got it. Should be ready soon.

Edit: Version 1.1 - Corrected a redundant RegEx pattern.
Bible Pericope Reference for Obsidian.kmmacros.zip (13.7 KB)

Here it is. You’ll have to unzip it, then open it with KM.

  • If you’re like me and you’re paranoid about malware, I’d suggest always importing someone else’s macros through File>Import Macros Safely…

  • There are notes in the file, but basically you need to have:

    1. Full name of the book (Genesis, not Gen.) because it would take forever to parse out the variations of the abbreviations for every book
    2. An actual existing file with the chapter and verse source text available (i.e. I don’t have the book of James ready, so if I try the macro on James 1:1-3 it won’t work.
    3. A range of verses, not a single verse (if it’s a single verse reference, you won’t need the macro and it wouldn’t save you any time).

I’ve done some testing and it seems to work OK for me, but if you find issues let me know. They can probably be fixed by tweaking the RegEx filter.

Example:

1 Corinthians 12:5-8

will give you:

![[1 Corinthians 12#5]]
![[1 Corinthians 12#6]]
![[1 Corinthians 12#7]]
![[1 Corinthians 12#8]]

  • If you want them all in a single line instead of on new lines each, that can be done as well.

Note: This works for the methodology posted at the beginning of this thread by @Joschua, not the later ideas. Those might work as well with KM, I just haven’t tried yet.

I noticed that @Joschua mentioned selecting Versions. Would that carry inside the Vault, or would you have different Vaults for Different Versions? Wondering if I missed this in the thread.

You’re a gentleman and a scholar! Pardon my slow replies, I’m not really good with forums. I’m away from my work device now but I’ll try this out real soon! Once again, thank you :slight_smile:

Hi s0ph0s,

May I ask how to edit the output produced by the macro such that the format matches the naming of my obsidian files for each chapter?

For example, my file for 1 Corinthians 12 is titled

[[1 Cor-12]] rather than [[1 Corinthians 12]].

Other than that the macro works PERFECTLY! I’d edit it myself but I suspect the bottleneck here is my knowledge of RegEx!

I think this RegEx will do what you need:

(\d*\s*[a-zA-Z]*\-*\d{0,3})[:|.](\d*\-*\d*)

Just copy and paste that over what’s in the macro. :wink:

And I know what you mean about RegEx mastery. The good news is it’s a journey, not a destination.

1 Like

Wow! Just discovered this treasure trove of a thread.

It would be so helpful if someone at some point compiled a guide of how to setup all the techniques discussed in this thread to make a Bible Study (or other large text study) vault.

4 Likes

Since block referencing is a thing now, how would it change the way we reference to Bible verses? I can see another version of @Joschua’s script that would utilize block referencing instead of headers (though I’m not begging @Joschua to make another one, I’m not willing to change my set-up either lol).

The way I see it, using headers (the way Script 2.0 formats it) makes it easier for linking specific verse & chapter numbers i.e. [[John. 3#16]] whereas the global block referencing is better for searching specific keywords from a verse in mind, albeit the output of that isn’t quite as elegant unless you decide to use pipes for custom text, which is extra work. It still doesn’t fix the problem of wanting to link multiple verses since you would need to block ref every individual verse just like you would with headers (correct me if I’m wrong though, haven’t got the latest update so I haven’t really tried the feature out).

PS: Don’t know why the word “block” is highlighted lol

Talking about The Bible…
This approach is of course also a possibility :wink:


Came up in one of the RSS-feeds in my Obsidian workflow today
1 Like

So I have changed my approach to organization slightly. I’m still using one file per chapter and using headers to subdivide chapters. The difference is now I’m using the headers to divide by paragraph instead of by verse. I’m also using headings for sections (usually listed as sub-titles). H2 is used for sections while H3 is used for paragraphs so the outline functionality will be useful for longer chapters.


Here’s an example. Note there is a 5th paragraph that is cut off:


This structure allows me to reference a chapter (Romans 4) a whole section (Abraham Justified…) or a paragraph (P3). It also allows me to do a block ref by typing in a section of the Text. (Autocomplete is shown below):


When Referenced, the headers provide a listing of the chapter and verses contained where the block reference does not. The edit mode is on top, preview of the same section is below:

Edit: formatting to make things easier to read.

4 Likes

Wow thank you for sharing this! I’m newer to the program, and this thread has been pretty intimidating to me because of all the complex work arounds I’ve seen discussed here. But Because of block referencing, you’re method makes so much more sense to me! This could really help me. I think I’d prefere leaving the verse numbers among the scriptures for me personally, but this is great! I’m going to try and adopt this and see how it works for me! Thanks for sharing!

1 Like

How hard would it be to turn this CSS snippet into a plugin that works across all themes:

.markdown-embed-content h6{
  position: absolute;
  font-size: small;
  right: 101%;
  margin-top: 3px;
}

I am having no luck tweaking it for use with Minimal Theme. If someone would be willing to write the complete CSS needed to override a theme’s styling of transclusions, it could either be pasted at the end of any obsidian.css or included in a separate stylesheet in a forthcoming release of Obsidian. Any ideas how to address this?

1 Like

It’s probably just conflicting with something else in the theme. I can take a look and help you out, but it will most likely have to wait until after this week. We’re working crazy overtime at work and I’ve got an chemistry exam due by Friday. Next week though I’m on holiday starting Wednesday. I can go through the theme and show you how it works too if you are interested in learning.

2 Likes

That would be great! Once I can get the CSS working I will be able to transfer all of my scattered studies into one place.

+1
I also ran into the same issue. I’ve been using the “Bear”-Theme for a while but the Minimal Theme just looks better for me and is more distraction free.
I already tried to tweak the css settings to get the verse numbers aligned but until now without success.

In case it’s useful to anyone else, here is my substitution command for converting a “regular Scripture reference” to a wiki link Scripture reference using vim:

:%s/\v( ?[1-3]? [A-Z][a-z]*) ([0-9][0-9]?[0-9]?:[0-9][0-9]?-?[0-9]?[0-9]?)/ [[\1#\2]]/g

The above will sometimes leave an extra space after the opening [[ so then I run this to remove that:

:%s/\[\[ /[[/g

I typically run this while editing multiple files, something like vim notes/*.md and then use bufdo to run the substitutions on all the files at once and save to disk.

:bufdo execute '%s/\v( ?[1-3]? [A-Z][a-z]*) ([0-9][0-9]?[0-9]?:[0-9][0-9]?-?[0-9]?[0-9]?)/ [[\1#\2]]/g' | update

and then:

:bufdo execute ':%s/\[\[ /[[/g' | update

For reference, the above turns text like this:

Paul refers to Genesis 15:6 in Galatians 3:6.

1 John 4:5 and 2 Chronicles 7:11 and also Psalm 119:9-11

into text like this:

Paul refers to [[Genesis#15:6]] in [[Galatians#3:6]].

[[1 John#4:5]] and [[2 Chronicles#7:11]] and also [[Psalm#119:9-11]].

Of course, if you use a similar reference syntax for anything else the above commands will convert them as well. It does not convert Galatians 4 or Galatians.

To round out the setup I have, I’m using 1 file per book for Scripture, like this:

Ephesians

Chapter 1

Paul Addresses The Ephesians
1:1

Paul, an apostle of Christ Jesus by the will of God,
To the saints who are in Ephesus, and are faithful in Christ Jesus:

1:2

Grace to you and peace from God our Father and the Lord Jesus Christ.

Overall, this is really suiting my use case, which is mostly speaking notes with references into my mobile app while studying Scripture. These are pushed into a private Github repository which Obsidian then pulls down on startup. I think the next step for me is to automate the reference conversion, maybe via a git hook on my repository so that the references get linkified before a commit.

2 Likes