Verse chapter linking

This commit is contained in:
2023-01-21 01:46:58 -08:00
parent 98768d9399
commit f629835961
4 changed files with 25 additions and 11 deletions
+12 -3
View File
@@ -18,6 +18,9 @@ Search highlighting
Styles
Bible Reading Plan
Bible Reader
Rich: <hr> on each comma
find: handle ending with :
find: handle ending with ,
"""
@@ -259,9 +262,10 @@ def return_dict_rich(ref, defs):
response = ""
for e in defs:
response += e + "<br><br>"
# return (header.read() + response_html.read().format(passage = ref.capitalize(), text = response) + css.read())
return (
response_html.read().format(passage=ref.capitalize(), text=response)
response_html.read().format(
chapter=ref.split(":")[0], passage=ref.capitalize(), text=response
)
+ css.read()
)
@@ -353,7 +357,12 @@ def response_rich(scripture):
verse = str(scripture[idx_verse])
text = str(scripture[idx_text])
passage = bookname + " " + chapter + ":" + verse
return response_html.read().format(passage=passage, text=text) + css.read()
return (
response_html.read().format(
chapter=passage.split(":")[0], passage=passage, text=text
)
+ css.read()
)
def response_single(scripture):