import os, datetime AUTH_BLOCK = f""" Digital Crystal Protocol — Authorship Propagation Author: Donald Paul Smith aka FatherTimeSDKP ORCID: 0009-0003-7925-1653 DOI(s): 10.17605/OSF.IO/DJA9G | 10.17605/OSF.IO/XMTQC | 10.17605/OSF.IO/E7GWN | 10.17605/OSF.IO/CM7WQ Signature: FTSDKP::DPS::Kapnack::QCC::Crystal.v1 Timestamp: {datetime.datetime.utcnow().isoformat()}Z License: Sovereign Substrate License v1.0 (immutable authorship, mandatory citation) """ EXTENSIONS = [".py", ".md", ".txt", ".json", ".csv"] def propagate_authorship(path): with open(path, "r+", encoding="utf-8") as f: content = f.read() if "Digital Crystal Protocol — Authorship Propagation" not in content: f.seek(0, 0) f.write(AUTH_BLOCK + "\n\n" + content) for root, _, files in os.walk("."): for file in files: if any(file.endswith(ext) for ext in EXTENSIONS): try: propagate_authorship(os.path.join(root, file)) except Exception: pass