From b3752923aa7f80fc49fbda5c82b879016ff2d026 Mon Sep 17 00:00:00 2001 From: Zach DeCook Date: Sat, 30 Oct 2021 11:58:28 -0400 Subject: bibles: fix the web --- webp.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'webp.py') diff --git a/webp.py b/webp.py index c79ba4a..7532b13 100755 --- a/webp.py +++ b/webp.py @@ -19,7 +19,8 @@ def main(qs): if not qs: print("10 Enter a scripture reference\r\n") return - + books=subprocess.check_output([f"find", "webp/", "-name", f'??-*.usfm']).strip().split(b"\n") + books.sort() passages = parse_string(qs) # TODO: Also handle "john 3, tomato 2" errors? if type(passages[0]) == tuple: @@ -32,10 +33,9 @@ def main(qs): print("# " + passage.format()) printing = 0 inendc = False - bookabbrev = passage.start.format('a').upper() - eprint(bookabbrev) - fname = subprocess.check_output([f"find", "webp/", "-name", f'*-{bookabbrev}*']).strip() - f = open(fname) + bookn = passage.start.book + eprint(bookn) + f = open(books[bookn]) startc = passage.start.chapter startv= passage.start.verse endc = passage.end.chapter -- cgit 1.4.1