GsLogiMaker / my-bible-obsidian-plugin

Your own customization bible in your personal vault!
MIT License
18 stars 2 forks source link

Is there a way to get the verses in paragraph format as shown in a bible? #23

Closed lolzypops closed 6 days ago

lolzypops commented 3 weeks ago

Thanks so much for your work here 🙌 - I was just wondering if there's a way to format the verses so that each verse is not on a new line. Think it would be helpful so that we can read the markdown file like we would in a Bible - to see where a train of thought starts and ends. Also, is it possible to include the headings for different paragraphs?

E.g. Genesis 1:1-4 (ESV)

The Creation of the World

1:1 In the beginning, God created the heavens and the earth. 2 The earth was without form and void, and darkness was over the face of the deep. And the Spirit of God was hovering over the face of the waters. 3 And God said, "Let there be light," and there was light. 4 And God saw that the light was good. And God separated the light from the darkness. 5 God called the light Day, and the darkness he called Night. And there was evening and there was morning, the first day.

2 Things I'm proposing that it'd be awesome to support in this example:

What it looks like on the ESV online bible just for reference.

Screenshot 2024-08-21 at 11 03 28 PM
GsLogiMaker commented 3 weeks ago

It is possible, but you would not be able to link to specific verses anymore.

GsLogiMaker commented 3 weeks ago

Wait, I'm partially wrong. Dynamic verses support rendering as an entire chapter with the verses in a single paragraph, but you can't currently build your Bible this way. I'll have to patch that in.

lolzypops commented 3 weeks ago

It is possible, but you would not be able to link to specific verses anymore.

Yeah, I'm willing to live with this tradeoff for better readability so it would be awesome if we had the option.

Not sure how easy this is to adapt your code to - if I could make a custom version of your plugin, would you be able to point me to which functions in main.ts I would need to change to:

  1. Add section headings
  2. To keep line breaks from the bolls life API so that we can render paragraphs properly

Thanks again for working on this plugin - it's already been immensely helpful!

GsLogiMaker commented 2 weeks ago

It is technically possible right now, but it is not working right.

When building your Bible, in the Body format setting if you replace {verses} with ```verse {book} {chapter} ``` then that will render all verses in a single block, but the first verse is omitted for some reason, and the verses are still not formatted in paragraphs. This shouldn't be too difficult to fix though.

GsLogiMaker commented 1 week ago

I don't think the bolls.life API supports retrieving text in paragraphs or with headings. I can however, allow generating your Bible with all verses as in a block like so:

Screenshot from 2024-09-06 12-15-39

GsLogiMaker commented 6 days ago

Pushed a patch to the plugin fixing processors for whole chapters. The settings I suggested for Body format should work now. I'll close this issue, because there is nothing more I can do to improve the formatting of the text.