I like to journal when reading the Bible and wanted to try using obsidian. Biggest missing component was actually getting passages into that flow. A few hours later and here we are with an alpha of my first plugin: the Bible Reference Plugin!
- Create a link for a Bible passage reference (ex: “1 Cor 1:1-3”).
- Hover over the link (editor or preview).
- The plugin grabs the passage html and puts it in a separate note for use.
And that’s it. You now can hover over the link and it will render the passage html in the preview.
How it works:
- Plugin triggers on link “hover” events
- Checks if link text matches Bible Reference regex
- Checks if note already exists for the passage
- Reaches out to ESV.org for the passage data
- Throws the passage html into a new note
- Cleans up the link text with the passage canonical form
Gif is worth 1000 words:
Other Important Stuff:
- This is alpha, so standard “I’m not liable for breaking the universe” thing
- The ESV.org API requires a token which you need to generate on their website after creating an account (see README for details). I’ll see about making one to share (there are API limits), but for now you need your own. I think token generation is manual, so it may take a few days for them to respond.
- Speaking of, the ESV.org API has limits on request count and amount cached. IMPORTANT: this plugin is non-custodial so YOU are responsible for adhering to these limits.
- Maybe in the future, I will add automation to stay within the storage bounds (delete the oldest-used passage note to keep a cyclical cache), but for now, be mindful of what you are pulling. You can safely delete passage notes and they will be re-queried next time the reference link is previewed.
- There are a handful of settings that the ESV.org API supports and I’ve added the ones that make sense. Configuration for these are in the settings.
- This is my first plugin and I have no idea what I’m doing. Would love feedback!
- Plugin is far from finished. I know it needs some cleanup. I literally wrote it today, so its thrown together.
- I will make it an official plugin when things are tested a bit more. For now you will need to install manually.