#!/usr/bin/env python3 # pip3 install bible-passage-reference-parser from bible import parse_string import os import sys from lsv import printlsv from oeb import printoeb from webp import printwebp from bsb import printbsb from tcgnt import printtcgnt from hboWLC import printhboWLC def main(qs): qs = qs.replace('%20',' ') if not qs: print("10 Enter a scripture reference\r\n") return passages = parse_string(qs) if type(passages[0]) == tuple: print("51 " + str(passages[0][0]) + "'\r\n") return print("20 text/gemini\r\n") 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) print() printtcgnt([passages[0]], False, False) printtcgnt([passages[0]], False, False, printStrongs=True) printhboWLC([passages[0]], False, False) printhboWLC([passages[0]], False, False, printStrongs=True) if __name__ == '__main__': qs = os.getenv("QUERY_STRING") or (sys.argv[1] if len(sys.argv) >= 2 else '') main(qs)