From 7e573fc75644b822cb6451a274d00d18caa015c4 Mon Sep 17 00:00:00 2001 From: Zach DeCook Date: Mon, 11 Dec 2023 22:52:50 +0000 Subject: biblestudy: add bsb --- bsb.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'bsb.py') diff --git a/bsb.py b/bsb.py index 1c63665..9dcae5c 100755 --- a/bsb.py +++ b/bsb.py @@ -19,14 +19,18 @@ def main(qs): print("51 " + str(passages[0][0]) + "'\r\n") return print("20 text/gemini\r\n") - print('=> https://berean.bible/ This content from Berean Standard Bible (public domain)') - print('=> gemini://gemini.zachdecook.com/usfm2gmi/ and rendered with usfm2gmi') + printbsb(passages) +def printbsb(passages, title=True, plug=True): + if plug: + print('=> https://berean.bible/ This content from Berean Standard Bible (public domain)') + print('=> gemini://gemini.zachdecook.com/usfm2gmi/ and rendered with usfm2gmi') for passage in passages: printing = 0 inendc = False books=sco(["ls", "bsb/"]).strip().split(b"\n") fname=b"bsb/"+books[passage.start.book - 1] - print("# " + passage.format()) + if title: + print("# " + passage.format()) f = open(fname) startc = passage.start.chapter startv= passage.start.verse -- cgit 1.4.1