scripts for my gemini capsule
Diffstat (limited to 'oeb.py')
-rwxr-xr-xoeb.py11
1 files changed, 8 insertions, 3 deletions
diff --git a/oeb.py b/oeb.py
index 7e97b26..7656746 100755
--- a/oeb.py
+++ b/oeb.py
@@ -19,8 +19,12 @@ def main(qs):
print("51 " + str(passages[0][0]) + "'\r\n")
return
print("20 text/gemini\r\n")
- print('=> https://github.com/openenglishbible/Open-English-Bible This content from OpenEnglishBible (public domain)')
- print('=> gemini://gemini.zachdecook.com/usfm2gmi/ and rendered with usfm2gmi')
+ printoeb(passages)
+
+def printoeb(passages, title=True,plug=True):
+ if plug:
+ print('=> https://github.com/openenglishbible/Open-English-Bible This content from OpenEnglishBible (public domain)')
+ print('=> gemini://gemini.zachdecook.com/usfm2gmi/ and rendered with usfm2gmi')
for passage in passages:
printing = 0
inendc = False
@@ -30,7 +34,8 @@ def main(qs):
# TODO: throw 51?
print(f"{book} doesn't exist yet in the OEB\r\n")
continue
- print("# " + passage.format())
+ if title:
+ print("# " + passage.format())
f = open(fname)
startc = passage.start.chapter
startv= passage.start.verse