HEL-892: correct five source-history citations and validate original fetch records
Co-authored-by: multica-agent <github@multica.ai>
This commit is contained in:
@@ -7,6 +7,8 @@ import json
|
||||
import os
|
||||
from pathlib import Path
|
||||
|
||||
REPORT = Path(__file__).resolve().parent.parent / "WanAnimate2动作迁移循环长视频固定参考中文说明.md"
|
||||
SOURCE_ROOT = Path(__file__).resolve().parent
|
||||
OUT = Path(os.environ.get("A2LOOP_EVIDENCE_OUT", Path(__file__).resolve().parent)).resolve()
|
||||
|
||||
|
||||
@@ -117,7 +119,7 @@ def main():
|
||||
]
|
||||
lines += ["### 固定原件索引", ""]
|
||||
for k, e in enumerate(b["sources"]):
|
||||
data = (OUT / e["local_file"]).read_bytes()
|
||||
data = (SOURCE_ROOT / e["local_file"]).read_bytes()
|
||||
assert hashlib.sha256(data).hexdigest() == e["sha256"]
|
||||
lines += [
|
||||
(
|
||||
@@ -130,9 +132,7 @@ def main():
|
||||
"",
|
||||
]
|
||||
index.append(dict(document=b["source_path"], **e))
|
||||
(OUT.parent / "WanAnimate2动作迁移循环长视频固定参考中文说明.md").write_text(
|
||||
"\n".join(lines).rstrip() + "\n"
|
||||
)
|
||||
REPORT.write_text("\n".join(lines).rstrip() + "\n")
|
||||
(OUT / "fixed-source-index.json").write_text(
|
||||
json.dumps(index, ensure_ascii=False, indent=2) + "\n"
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user