diff options
| author | Zach DeCook <zachdecook@librem.one> | 2023-12-11 22:52:50 +0000 |
|---|---|---|
| committer | Zach DeCook <zachdecook@librem.one> | 2023-12-11 22:52:50 +0000 |
| commit | 7e573fc75644b822cb6451a274d00d18caa015c4 (patch) | |
| tree | 6ba5012db9f9caebc73e3c014dab384d56b05b18 /bsb.py | |
| parent | f6500b1ed9a7ef6988267cb9bfe9cb4c2ee52fbf (diff) | |
| download | cgi-bin-7e573fc75644b822cb6451a274d00d18caa015c4.tar.gz | |
biblestudy: add bsb
Diffstat (limited to 'bsb.py')
| -rwxr-xr-x | bsb.py | 10 |
1 files changed, 7 insertions, 3 deletions
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 |
