From 7727cfab193cae78e3c87e463357e0c56ab04e59 Mon Sep 17 00:00:00 2001 From: husanjon Date: Mon, 13 Apr 2026 17:34:56 +0500 Subject: [PATCH] restore composer.json, add mysqli extension --- sync_firebase_products.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/sync_firebase_products.py b/sync_firebase_products.py index 89ebc57..b6c59ae 100644 --- a/sync_firebase_products.py +++ b/sync_firebase_products.py @@ -132,7 +132,15 @@ def build_product_data(doc_id: str, data: dict) -> dict: _section_id=data.get("section_id") or "", ) - +def print_progress(current, total, created, updated, skipped, errors): + percent = int(current / total * 100) if total else 0 + bar_filled = percent // 5 + bar = "█" * bar_filled + "░" * (20 - bar_filled) + line = ( + f"\r [{bar}] {percent:3d}% " + f"{current}/{total} | " + f"✓ {created} ↑ {updated} — {skipped} ✗ {errors}" + ) print(line, end="", flush=True)