about summary refs log tree commit diff
diff options
context:
space:
mode:
authorZach DeCook <zachdecook@librem.one>2023-12-11 22:52:50 +0000
committerZach DeCook <zachdecook@librem.one>2023-12-11 22:52:50 +0000
commit7e573fc75644b822cb6451a274d00d18caa015c4 (patch)
tree6ba5012db9f9caebc73e3c014dab384d56b05b18
parentf6500b1ed9a7ef6988267cb9bfe9cb4c2ee52fbf (diff)
downloadcgi-bin-7e573fc75644b822cb6451a274d00d18caa015c4.tar.gz
biblestudy: add bsb
-rwxr-xr-xbiblestudy.py2
-rwxr-xr-xbsb.py10
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)
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