File size: 806 Bytes
bc29595
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31

# generate_manifest.py (new utility)
import hashlib
import json
import os

def generate_manifest():
    manifest = {
        "last_updated": datetime.utcnow().isoformat() + "Z",
        "modules": {}
    }
    
    modules = ["response_handler", "updater"]
    
    for module in modules:
        file_path = f"{module}.py"
        if os.path.exists(file_path):
            with open(file_path, "r") as f:
                content = f.read()
            sha256 = hashlib.sha256(content.encode()).hexdigest()
            manifest["modules"][module] = {
                "version": "1.0",
                "sha256": sha256
            }
    
    with open("manifest.json", "w") as f:
        json.dump(manifest, f, indent=2)

if __name__ == "__main__":
    from datetime import datetime
    generate_manifest()