~repos /only-bible-app

#kotlin#android#ios

GIT_CONFIG_PARAMETERS="'http.version=HTTP/1.1'" git clone https://git.pyrossh.dev/only-bible-app.git
Discussions: https://groups.google.com/g/rust-embed-devs

The only bible app you will ever need. No ads. No in-app purchases. No distractions.



scripts/compare_bible.py



import collections
import sys
target = sys.argv[1] if len(sys.argv) > 1 else "scripts/files/pa.txt"
def parse_chapters(f):
chapters = collections.OrderedDict()
with open(f) as fh:
for line in fh:
parts = line.strip().split("|")
if len(parts) < 7:
continue
key = (parts[1], parts[2])
chapters.setdefault(key, 0)
chapters[key] += 1
return chapters
en = parse_chapters("scripts/files/en_kjv.txt")
tgt = parse_chapters(target)
missing_ch = 0
missing_v = 0
mismatch_v = 0
for key in en:
if key not in tgt:
missing_ch += 1
missing_v += en[key]
print("MISSING: book={} ch={} expected={}".format(key[0], key[1], en[key]))
elif en[key] != tgt[key]:
diff = en[key] - tgt[key]
mismatch_v += diff
print("MISMATCH: book={} ch={} en={} tgt={} diff={}".format(key[0], key[1], en[key], tgt[key], diff))
for key in tgt:
if key not in en:
print("EXTRA: book={} ch={} verses={}".format(key[0], key[1], tgt[key]))
print("\nMissing chapters: {}, missing verses: {}".format(missing_ch, missing_v))
print("Mismatched chapters total diff: {}".format(mismatch_v))
print("Grand total missing: {}".format(missing_v + mismatch_v))