OPEN SOURCE
tools/verify-package.py
Read on this site and download the files you need.
Nichijoyaku was created using AI. A complete review by human biblical-language and biblical-studies specialists has not been established. Read alongside established translations and original-language resources.
← Back to the open-source guide
1import hashlib, json2from pathlib import Path3root=Path(__file__).resolve().parents[1]/'edition-1'4package=json.loads((root.parent/'PROVENANCE.json').read_text())5for name, expected in package['files'].items():6if hashlib.sha256((root.parent/name).read_bytes()).hexdigest()!=expected:7raise SystemExit('Source hash mismatch: '+name)8manifest=json.loads((root/'checksums.json').read_text())9for name, expected in manifest['files'].items():10actual=hashlib.sha256((root/name).read_bytes()).hexdigest()11if actual!=expected: raise SystemExit('Hash mismatch: '+name)12provenance=root.parent/'provenance-v1'13record=json.loads((provenance/'index.json').read_text())14for name, expected in record['files'].items():15if hashlib.sha256((provenance/name).read_bytes()).hexdigest()!=expected:16raise SystemExit('Provenance hash mismatch: '+name)17print('Verified',len(package['files']),'source files,',len(manifest['files']),'edition files and historical provenance')18