This script is forked from selfire1's BibleGateway-to-Obsidian, which adapts jgclark's wonderful BibleGateway-to-Markdown script to export for use in Obsidian. It accompanies a Bible Study in Obsidian Kit that gets you hands-on with using Scripture in your personal notes.
What the script does is fetch the text from Bible Gateway and save it as formatted markdown file. Each chapter is saved as one file and navigation between files as well as a book-file is automatically created. All of the chapter files of a book are saved in it's numbered folder.
This script is intended to be as simple as possible to use, even if you have no idea about Scripting. If you have any questions, please reach out to me either on github or Discord (selfire#3095
).
- This is not affiliated to, or approved by, BibleGateway.com. In my understanding it fits into the conditions of usage but I make no guarantee regarding the usage of the script, it is at your own disgression.
- By default, the version is set to the ESV. You can change the version, as long as you honour the copyright standards of different translations of the Bible (See: BibleGateways overview).
- Change ESV to XXX in config.sh
- I have little experience in scripting–through this project I taught myself bash and regex basics. If you run into issues or have a way to simplify this script, please raise an issue or reach out on Discord (
selfire#3095
).
Here are the tools we are going to use:
- Our command line (Terminal)
- A text editor (like Atom).
In order to run the scripts, we will need to install ruby. Ruby comes pre-installed on MacOS but if you run into issues, update to the latest version.
Follow the instructions to download and set up jgclark's BibleGateway-to-Markdown.
NOTE: You don't need to download separate if you are cloning this repository git as it is a submodule. Please use the --recurse-submodules
with git to download the submodules
git clone --recurse-submodules https://github.com/joebuhlig/BibleGateway-to-Obsidian.git
Open terminal. Use the following command to navigate to the folder in which both scripts are located:
pwd
Show your current directoryls
List all contents in the current directorycd
Enter 'down' in a subdirectory (E.g.cd Desktop
)cd ..
Brings you 'up' one directory
Once you are in the directory, run bash bg2obs.sh
. This will run the bash script.
NOTE: Update the config.sh
with the text editor first if you would like to adjust any settings prior to executing the command. Default settings include:
- Translation is
ESV
- Headers is
false
- include headers - Bold letters is
false
- set the words of Jesus to bold - Split verses is
true
- splits the verses into separate folders for each chapter and files for each verse - Master files is
true
- *creats a master file for each chapter folder (only available if split verses istrue
)
WARNING: During the execution of the script your clipboard will be unusable as it is used to capture the contents pulled from Bible Gateway
Run bash rename-folders.sh
to add book numbers to the folder for sorting.
NOTE
: With this option, the subfolders within your translation folder (ie.ESV
) will be updated with sequential prefixes like01 - Genesis
,02 - Exodus
and so on.
There you go! Now, just move the "ESV" folder into your Obsidian vault. You can use the provided The Bible.md
file as an overview file. (Not setup with folder numbers)
This script downloads the ESV by default. If you wish to use a different translation, open the confg.sh
file in a text editor and follow the annotations in there (It is just changing one line). Make sure to honour copyright guidelines.