scripts for my gemini capsule
asv: read whole chapter
| -rwxr-xr-x | asv.py | 11 | ||||
| m--------- | usfm2gmi | 0 |
2 files changed, 10 insertions, 1 deletions
@@ -17,11 +17,20 @@ def main(qs): bookNum=passage.start.book fname=sco(['find', 'asv/', '-name', f'{bookNum}*']).strip() root = ET.parse(fname).getroot() + printing = 0 + endc = False for thing in list(root): + if thing.tag == 'chapter': + if int(thing.attrib['number']) == int(passage.start.chapter): + printing = 1 + if int(thing.attrib['number']) == int(passage.end.chapter): + endc = True + if int(thing.attrib['number']) > int(passage.end.chapter): + printing = 0 + if printing >= 1: printf(convertBlock(thing)) - printing = 0 # for line in open("asv.xml.gmi"): # if line == '### ' + passage.start.format().split(':')[0]: # printing = 1 diff --git a/usfm2gmi b/usfm2gmi -Subproject 8e9a836f62f1395ea4e49d08e27bbc89e29c857 +Subproject a3e7f46093c6ef9b72ca00249e41f542d06de6c |