tim-hub / obsidian-bible-reference

Take Bible Study notes easily in the popular note-taking app Obsidian, with automatic verse and reference suggestions.
https://antioch.tech/obsidian-bible-reference/
MIT License
233 stars 41 forks source link

Expose Verse Callout to JS API #133

Closed minermaniac447 closed 11 months ago

minermaniac447 commented 1 year ago

Lots of other plugins (e.g. https://blacksmithgu.github.io/obsidian-dataview/api/intro/) expose some functionality through a JS api, which can be accessed through code by other plugins/userscripts within Obsidian. I would love to have some equivalent for this plugin - for instance, if I could access a function such as verseLookup(book, chapter, verse) and it would return the formatted callout for that book, chapter, and verse. Ideally, this would have a bunch of options/variants, but I'm not sure the best way to do that - we may need to also have some object in which we specify version, book, start and end chapter and verse, etc - I'd need to familiarize myself more with that process to know how much of that is feasible.

It would also be cool to have a verseLookupMinimal function that returns just the verse context, without the surrounding callout. This would make interfacing with custom userscripts and other plugins much nicer.

(Currently, my use for this is I have a custom userscript command that inserts the verse + a bit of stuff surrounding it; right now it just inserts the verse text and I have to, for each one, go to the --bookchapter:verse tagline and trigger a plugin replacement. It would be great if I could skip having to do that for each different insertion, it would speed up the process greatly)

stale[bot] commented 11 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.