scripts for my gemini capsule
Diffstat (limited to 'webp.py')
| -rwxr-xr-x | webp.py | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -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 |