Pre-publication review draft
日常訳NICHIJOYAKU日本語 ↗

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

tools/verify-package.py18 linesDownload this file ↓

This is the same source included in the download. Each line number is a link you can save or share.

File verification detailsSHA-256 a16d255f87753d938106cdb226e1b8b41a667962c06ef3a2d4dba9cf3e3fb9cf
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():6    if hashlib.sha256((root.parent/name).read_bytes()).hexdigest()!=expected:7        raise SystemExit('Source hash mismatch: '+name)8manifest=json.loads((root/'checksums.json').read_text())9for name, expected in manifest['files'].items():10    actual=hashlib.sha256((root/name).read_bytes()).hexdigest()11    if 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():15    if hashlib.sha256((provenance/name).read_bytes()).hexdigest()!=expected:16        raise SystemExit('Provenance hash mismatch: '+name)17print('Verified',len(package['files']),'source files,',len(manifest['files']),'edition files and historical provenance')18