Removing Sub-headings
kevinkappa opened this issue · 4 comments
Hey, Jonathan:
This is the first time I'm posting an "issue" on GitHub, so forgive me if I'm not following standard protocol somehow: is there any way to remove the sub-headings from being received? I've been using your Ruby script in tandem with the Bible Gateway to Obsidian shell script (as that script requires), but unless I made some mistake in following the instructions, it seems that there is a problem with the sub-headings appearing as regular text amidst the verses, which causes readings like this:
"that your charitable deed may be in secret; and your Father who sees in secret will Himself reward you openly.The Model Prayer" (supposed to be Matthew 6:4, but it has "The Model Prayer" concatenated at the end).
As you might imagine, this would become problematic if I was reading a set of verses that I wasn't familiar with and the sub-heading manages to be integrated well enough into the verses that I don't notice that it's not part of the verses.
*note: I'm using the NKJV, if that's what's causing any unintended issues with sub-headings.
Hi Kevin, the underlying HTML returned by BibleGateway is hugely variable between versions, particularly about how subheadings are included. I've not done any testing with NKJV, so I'm not surprised there's an issue. I'll have a look, but it won't be for some days after Easter.
Hi, @kevinkappa. When I try this with bg2md -v NKJV -c -f -r Mt 6.1-6
I get:
Matthew 6:1-6 (New King James Version)
Do Good to Please God
6:1 "Take heed that you do not do your charitable deeds before men, to be seen by them. Otherwise you have no reward from your Father in heaven. 2 Therefore, when you do a charitable deed, do not sound a trumpet before you as the hypocrites do in the synagogues and in the streets, that they may have glory from men. Assuredly, I say to you, they have their reward. 3 But when you do a charitable deed, do not let your left hand know what your right hand is doing, 4 that your charitable deed may be in secret; and your Father who sees in secret will Himself reward you openly.
The Model Prayer
5 "And when you pray, you shall not be like the hypocrites. For they love to pray standing in the synagogues and on the corners of the streets, that they may be seen by men. Assuredly, I say to you, they have their reward. 6 But you, when you pray, go into your room, and when you have shut your door, pray to your Father who is in the secret place; and your Father who sees in secret will reward you openly.
I.e. this seems OK. The rest of the chapter's sub-headings seem to be fine as well.
Can you confirm that the output is OK for you without the Obsidian script being involved?
NB: You might want to see my response to the author of the Obsidian script -- it's for this sort of reason I suggested better to have one fuller script than two separate ones.
Hey @jgclark, I installed your script as a submodule now. I think that should keep it on the latest version.
👍