Organising The Bible in Obsidian

As much as I would love for the snippet to work for me, it still doesn’t :confused:.

Hello,

I really like your Bible set up. Congratulations!

I am really not tech savvy and have tried several times in other computers to go through the steps but have not been able to do so successfully.

Would you be open to helping me out for a couple of hours to set up my favorite bible like yours?

Another option would be simply doing it yourself in your personal computer since you already have ruby and the gems set up and then sharing the files with me. Whatever is best for you.

This is a problem that I have had for a long time, have tried to fix and am willing to compensate you for your time. Please let me know.

Thanks,

Daniel Aragon

I’ll try to help you. I just send you an direkt message.

I have a solution for the reading view (works for Minimal Theme). That removes the space after each verse.

body {
  /* Spacing */
  --spacing-p: 0em !important;
}

I would love to see a snippet, that works also for the editor mode.

Hi everybody !

I’ve just released an early alpha for a plugin I’ve been building for my bible studies within Obsidian. It allows linking to a range of headings, not only one heading, using an extended [[Page#HeadingA#HeadingB]] format. Bible link to a verse range is something I’ve been struggling with for a long time within Obsidian, with some hackish solutions I was never satisfied with !

Hopefully that plugin could become useful for some of you (at least, it will be for me).
Any help on the development and/or debugging / testing / feedback is very welcome.

EDIT : I got a few questions, so for those who wonder : the plugin is not yet available on the official community list (request pending) but meanwhile you can install it using @TfTHacker’s awesome Obsidian42 - BRAT plugin.

5 Likes

Greetings~

New & improved Berean Study Bible with Strongs definitions.

5 Likes

That looks like a great solution to the seemingly-perpetual problem of linking to a range of verses. Thanks for all the work you put into it!

1 Like

Awesome project. Would you mind giving us a hint on how that Bible was built ? I guess you have coded some scripts to parse the BSB and build a markdownized version of it ?

1 Like

Thank you @Limezy . I appreciate your interest and would be happy to share a bit of my workflow.

For this project, the BSB text along with the mapping to the strongs numbers was derived from BibleHub.com / OpenBible.

I used a variety of tools (mostly CLI) to parse the HTML into text:

curl
wget
html2md
jq
htmlq
xq

The data for the strongs lexicon was originally derived (many years ago) from multiple sources for a personal Bible study app I use. The data is stored in a local MySQL database for queries.

For examples:

curl --silent https://biblehub.com/text/john/3-16.htm | htmlq --text '.eng'

returns:

Thus
for
loved
 -
God
the
world,
that
the
Son,
the
only begotten,
He gave,
so that
everyone
 -
believing
in
Him
not
should perish,
but
should have
life
eternal.

Then, this command grabs the matching strongs numbers

curl --silent https://biblehub.com/text/john/3-16.htm | htmlq --text '.maintext tr a[title^="Strong"]'

returns:

3779
1063
25
3588
2316
3588
2889
5620
3588
5207
3588
3439
1325
2443
3956
3588
4100
1519
846
3361
622
235
2192
2222
166

This data is then processed further with a variety of custom bash & PHP scripts to create the markdown and linking.

For example:

#!/bin/bash
BOOK     = $1
CHAPTER  = $2
VERSE    = $3
COVENANT = $4

syslog -s "----"
syslog -s "Book: ${BOOK}, Chapter: ${CHAPTER}, Verse: ${VERSE}"

strongs = `/usr/bin/curl --silent https://openbible.com/strongs/${BOOK}/${CHAPTER}-${VERSE}.htm | /usr/local/bin/htmlq --text 'span.str a:only-child' | sed "s;Strong's\ ;;g" | sed 's;:;;g'`
words   = `/usr/bin/curl --silent https://openbible.com/strongs/${BOOK}/${CHAPTER}-${VERSE}.htm | /usr/local/bin/htmlq --text '.word'`

# echo "---";
# echo ${words};
# echo "---";
# echo ${strongs};
# echo "---";

syslog -s "----"
syslog -s "Words: ${words}"
syslog -s "----"
syslog -s "Strongs: ${strongs}"

SAVEIFS = $IFS       # Save current IFS (Internal Field Separator)
IFS     = $'\n'      # Change IFS to newline char
wd_arr  = ($words)   # split the `names` string into an array by the same name
st_arr  = ($strongs) # split the `names` string into an array by the same name
IFS     = $SAVEIFS   # Restore original IFS

verse=''
for index in "${!st_arr[@]}"
do
  if [ ${COVENANT} == '1' ]; then 
    verse += "${wd_arr[$index]}[[H${st_arr[${index}]%:*}]]"
  else
    verse += "${wd_arr[$index]}[[G${st_arr[${index}]%:*}]]"
  fi
done

echo ${verse}
exit
<?php

$cmd = '/path/to/lex.sh '.str_replace(" ", "_", strtolower($cmd_bk)).' '.$i.' '.$val->verse.' '.$book->covenant;;

echo "⏰ ".date("H:i:s").PHP_EOL;
echo '> running command: '.$cmd.PHP_EOL;

exec($cmd, $output, $retval);

echo "# Returned with status $retval and output:".PHP_EOL;

echo $output[0].PHP_EOL; // print_r($output);

// $md .= str_replace("�","",str_replace(" ]]","]]",str_replace("[[HHebrew]]","[[H0000]]",$output[0]))).PHP_EOL.PHP_EOL;

$find    = array("�"," ]]","[[HHebrew]]","[[H0]]");
$replace = array("","]]","","");
$md     .= str_replace($find,$replace,$output[0]).PHP_EOL.PHP_EOL;

// ...

I enjoy scripting and working with data, so projects like this are challenging and good practice.

As a side note, I am currently available for “consulting” work. I can help with just about any interesting Obsidian Vault data/import/export project. And, of course, I’m happy to answer any questions anyone has here on the forum.

Thanks for these insights, that’s truely impressive !
I do a lot of these kind of parsing projects, also to 'markdownize" Bibles or Theology texts.
It’s fun but quite challenging !

Hithere,

I wrote an Application which fetches german Versions from bibleserver.com.

It automatically makes the matching folders and files for the Bible-Linker.

Bible-Crawler-Rust

If you want to have more Versions in other languages, you can open an Issue.

I hope this helps.

Greetings,
Simerl

1 Like

In my vault I have each bible chapter in a separate file. At the moment I do not have YAML data. I would like to improve my vault on this point. What YAML metadata do you use for your bible files?

Mike, this sounds intriguing. I would like to link Accordance to Obsidian. I am a long-term accordance user, but brand-new Obsidian user. I think I get the principles of what you’re saying in your post, but I don’t understand how to do it. I don’t know how to use Apple script. Is there some kind of demo somewhere? Many thanks, Malcolm

I did post a demo further down in this thread.
See this entry:

https://forum.obsidian.md/t/organising-the-bible-in-obsidian/1490/14?u=mike

Thanks. I saw that. I’m sorry I still don’t understand how that would work in practice. You mention a text expander. What is that?

Here is a link to this Mac app. Good luck.

I’m pretty amateur with CSS, but how can I edit this snippet to only apply to pages with the bible cssclass in the YAML? I love this snippet for my Bible, but don’t want it to apply to the entire Vault. I’ve tried adding .bible before all the blocks, but it is not working.

Y’all, I just came across a stupidly easy way to get the text of the Bible formatted for Obsidian. (If you want it to have verses linkable as paragraphs, you’ll still have to do that work, but this will format it for easy readability, etc.)

Install Calibre. Add the Markdown Output plugin.

Buy an ebook copy of whatever translation it is you want. Put it in Calibre. Choose “convert” and set the output to “MD.” It will auto-magically spit it out for you, already formatted by book, chapter, and verse in MD.

(I have only tried this with a cheap, basic edition that doesn’t have a lot of extra “stuff” in it like book intros or study helps. If you have a more complex copy like that, it might need more tweaking after output.)

7 Likes

You can copy-and-paste them straight from Evernote into an Obsidian note.

So far, what I’ve settled on is something of a hybrid approach.

I have a set of notes that are the books of the Bible, but don’t contain the actual text. These are basically collection points for everything else related to a book study – sort of a note + MOC.

I have sections for a basic summary (title, author, date, number of chapters, background in a nutshell), key information about the book, key characters, keywords, and an outline. These aren’t necessarily filled in for every note, but they’re there.

Then there’s a header for notes on the full book, and a header for each chapter. (Some of the longer books are also broken into sections, so it’s easier to collapse them.)

These chapter headings are what I link to from relevant notes, and within these sections I also jot notes or questions relevant to verses in that chapter that don’t necessarily seem to warrant their own separate notes.



And I’ve recently added a second set of files that are just the text of each book that I can quote from for embeds using the AirQuotes plugin.

2 Likes