]> git.phdru.name Git - m_librarian.git/blobdiff - scripts/ml-import.py
Fix(scripts/ml-import.py): Display progress bar on updating counters
[m_librarian.git] / scripts / ml-import.py
index 169a715f217721b976dc90e98f1065bd29a92fb1..07c7fbb47e36f69122f81746616380ac737f3f99 100755 (executable)
@@ -41,4 +41,11 @@ if __name__ == '__main__':
             print("Ok")
         else:
             import_inpx(inpx)
-    update_counters()
+    if use_pbar:
+        print("Updating counters", end=': ')
+        sys.stdout.flush()
+        pbar = ml_ttyProgressBar()
+        update_counters(pbar_cb=pbar)
+        print("Ok")
+    else:
+        update_counters()