From 9618a313d6e04b0d0d06b03f342e70a827d4f574 Mon Sep 17 00:00:00 2001 From: Zach DeCook Date: Thu, 22 Apr 2021 07:35:26 -0400 Subject: web, oeb: fix small passage selection in python script --- oeb.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'oeb.py') diff --git a/oeb.py b/oeb.py index ce4718c..7d8c786 100755 --- a/oeb.py +++ b/oeb.py @@ -23,6 +23,7 @@ def main(qs): print('=> gemini://gemini.zachdecook.com/usfm2gmi/ and rendered with usfm2gmi') for passage in passages: printing = 0 + inendc = False book=passage.start.format('b').upper() eprint(book) fname=sco(['find', 'oeb/', '-iname', f'*-{book}*']).strip() @@ -37,15 +38,14 @@ def main(qs): startv= passage.start.verse endc = passage.end.chapter endv= passage.end.verse - endmark = passage.end.format('a c:v') for line in f: if f'\\c {startc}' == line.strip(): printing = 1 if printing == 1 and (f'\\v {startv} ') in line: printing =2 if (f'\\c {endc}') == line.strip(): - printing = 3 - if printing == 3 and (f'\\v {endv+1} ') in line: + inendc = True + if inendc and (f'\\v {endv+1} ') in line: printing =0 if (f'\\c {endc+1}') in line.strip(): printing =0 -- cgit 1.4.1