Windev

print(f"[Windev] Backed up: filepath → backup_path")

log.append( "time": self.timestamp(), "original": original, "backup": backup, "hash": hashlib.md5(open(original, 'rb').read()).hexdigest() ) windev

def timestamp(self): return datetime.now().strftime("%Y%m%d_%H%M%S") print(f"[Windev] Backed up: filepath → backup_path") log

# Log change self.log_change(filepath, backup_path) backup_path) def log_change(self

def log_change(self, original, backup): log = [] if os.path.exists(LOG_FILE): with open(LOG_FILE, 'r') as f: log = json.load(f)

# Optional Git auto-commit if GIT_AUTO_COMMIT: self.git_commit(filepath)

with open(LOG_FILE, 'w') as f: json.dump(log, f, indent=2)