scripts for my gemini capsule
biblestudy: add bsb
| -rwxr-xr-x | biblestudy.py | 2 | ||||
| -rwxr-xr-x | bsb.py | 10 |
2 files changed, 9 insertions, 3 deletions
diff --git a/biblestudy.py b/biblestudy.py index 6e92659..d1061b1 100755 --- a/biblestudy.py +++ b/biblestudy.py @@ -7,6 +7,7 @@ import sys from lsv import printlsv from oeb import printoeb from webp import printwebp +from bsb import printbsb def main(qs): if not qs: @@ -20,6 +21,7 @@ def main(qs): print("# " + passages[0].format()) # Attribution of minor citations for personal or non-commercial use can be provided as simply “LSV” or “Literal Standard Version.” Citations for commercial use, or distribution of the entire LSV Bible or entire book(s) of the LSV Bible, must be fully attributed and include both “Literal Standard Version (LSV)” and the name of our organization. printlsv([passages[0]], False, passages[0].length() > 5) + printbsb([passages[0]], False, False) printoeb([passages[0]], False, False) printwebp([passages[0]], False, False) printwebp([passages[0]], False, False, printStrongs=True) @@ -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 |