Notice of Data Breach : Learn about a data breach Ocuco recently experienced

Registration is Open for the Newest OptiCommerce Connect in Dublin!

Has Ocuco Transformed Your Business? Refer us and get rewarded!

Upcoming Events

Join us at optical industry events to see Ocuco’s solutions in action and connect with our experts in person.

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

# Log change self.log_change(filepath, backup_path)

os.makedirs(BACKUP_DIR, exist_ok=True)

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

# Copy file with metadata shutil.copy2(filepath, backup_path)

def timestamp(self): return datetime.now().strftime("%Y%m%d_%H%M%S")

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