diff --git a/scripts/compile.py b/scripts/compile.py index 777251c..808cfbf 100644 --- a/scripts/compile.py +++ b/scripts/compile.py @@ -2,19 +2,19 @@ """Compile connectors/index.json + fragment.json + file hash scan → connectors.json Usage: - python3 scripts/compile.py # scrive connectors/connectors.json - python3 scripts/compile.py --verify # verifica che l'indice esistente sia aggiornato + python3 scripts/compile.py # writes connectors/connectors.json + python3 scripts/compile.py --verify # checks existing index is up to date -Legge: - - connectors/index.json — lista ordinata di id folder - - connectors//fragment.json — entry dell'indice senza files[] - - scansione fisica dei file — SHA-256 e size di ogni file nella cartella +Reads: + - connectors/index.json — ordered list of connector folder ids + - connectors//fragment.json — index entry without files[] + - physical file scan — SHA-256 and size of every file in each folder -Produce: - - connectors/connectors.json — indice completo con files[] e SHA-256 +Produces: + - connectors/connectors.json — full index with files[] and SHA-256 -Esclusioni automatiche: fragment.json, connector.json, compile.sh, compile.py, -update_hashes.py, e l'intera directory scripts/. +Auto-excluded: fragment.json, connector.json, compile.sh, compile.py, +update_hashes.py, .DS_Store, and scripts/ directory. """ from __future__ import annotations @@ -100,7 +100,7 @@ def write_index(connectors: list[dict]) -> None: with open(out_path, "w") as f: json.dump(output, f, indent=2) f.write("\n") - print(f"\n✅ Scritto {out_path} ({len(connectors)} connector)") + print(f"\n✅ Written {out_path} ({len(connectors)} connectors)") def verify_index() -> bool: @@ -111,10 +111,10 @@ def verify_index() -> bool: fresh = compile_index() if current["connectors"] == fresh: - print("✅ L'indice è aggiornato — nessuna modifica.") + print("✅ Index is up to date — no changes.") return True else: - print("❌ L'indice NON è aggiornato. Esegui compile.py per rigenerarlo.") + print("❌ Index is stale. Run compile.py to regenerate.") return False