OPEN SOURCE
tools/verify-package.py
このサイトで読み、必要なファイルを保存できます。
日常訳はAIを用いて作成された翻訳です。人間の聖書学・原語の専門家による全訳の検証は確認されていません。既存の翻訳や原語資料と照らし合わせてお読みください。
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