]> git.phdru.name Git - bookmarks_db.git/commitdiff
Feat: Delete `root_folder.linear` before storing
authorOleg Broytman <phd@phdru.name>
Mon, 5 Aug 2024 20:19:03 +0000 (23:19 +0300)
committerOleg Broytman <phd@phdru.name>
Tue, 6 Aug 2024 06:18:53 +0000 (09:18 +0300)
check_urls_db.py
delete.py
set-real_title.py
set-title-list.py
set-urls.py

index 0acf33d7254e3e7f086e5c682254d9730bc288b8..b8db63982f69192dd38a11595cba861dcf07db31 100755 (executable)
@@ -158,6 +158,7 @@ def run():
         print(size, "bytes eaten")
 
     break_tree(root_folder.linear)
+    del root_folder.linear
     storage.store(root_folder)
 
     if rcode:
index 581aa7b3b4e2907013b245acc6514986dca3940c..0218071e656df04c137da7ea9e6377947423fc19 100755 (executable)
--- a/delete.py
+++ b/delete.py
@@ -10,7 +10,7 @@ import sys
 
 
 __author__ = "Oleg Broytman <phd@phdru.name>"
-__copyright__ = "Copyright (C) 2023 PhiloSoft Design"
+__copyright__ = "Copyright (C) 2023, 2024 PhiloSoft Design"
 __license__ = "GNU GPL"
 
 
@@ -30,7 +30,7 @@ def run():
 
     if report_stats:
         print("Broytman delete bookmarks, Copyright (C)"
-              " 2023 PhiloSoft Design")
+              " 2023, 2024 PhiloSoft Design")
 
     if len(args) != 1:
         sys.stderr.write("Usage: delete [-s] del_file\n")
@@ -91,6 +91,7 @@ def run():
                 del folder[_idx]
             del root_folder.linear[idx]
         break_tree(root_folder.linear)
+        del root_folder.linear
         storage.store(root_folder)
 
     if deleted and report_stats:
index 60b3c2026121f690bf87243b6c48ffab00c095c3..3705ee9f00fc82c673f4768dcd98b33c85044510 100755 (executable)
@@ -9,7 +9,7 @@ import sys
 
 
 __author__ = "Oleg Broytman <phd@phdru.name>"
-__copyright__ = "Copyright (C) 2002-2023 PhiloSoft Design"
+__copyright__ = "Copyright (C) 2002-2024 PhiloSoft Design"
 __license__ = "GNU GPL"
 
 
@@ -29,7 +29,7 @@ def run():
 
     if report_stats:
         print("Broytman set-real_title, Copyright (C)"
-              " 2003-2023 PhiloSoft Design")
+              " 2003-2024 PhiloSoft Design")
     if args:
         sys.stderr.write("set-real_title: too many arguments\n")
         sys.stderr.write("Usage: set-real_title [-s]\n")
@@ -43,7 +43,7 @@ def run():
         sys.stdout.flush()
 
     root_folder = storage.load()
-    from bkmk_objects import make_linear
+    from bkmk_objects import make_linear, break_tree
     make_linear(root_folder)
     objects = len(root_folder.linear)
 
@@ -74,6 +74,8 @@ def run():
         sys.stdout.flush()
 
     if changed:
+        break_tree(root_folder.linear)
+        del root_folder.linear
         storage.store(root_folder)
 
     if changed and report_stats:
index d37398475ddae5de7d9b8006f4042ecfefe7c12d..5f9e613eb35a8c29417d0f017c6ca834473c7f37 100755 (executable)
@@ -10,7 +10,7 @@ import sys
 
 
 __author__ = "Oleg Broytman <phd@phdru.name>"
-__copyright__ = "Copyright (C) 2003-2023 PhiloSoft Design"
+__copyright__ = "Copyright (C) 2003-2024 PhiloSoft Design"
 __license__ = "GNU GPL"
 
 
@@ -30,7 +30,7 @@ def run():
 
     if report_stats:
         print("Broytman set-title-list, Copyright (C)"
-              " 2003-2023 PhiloSoft Design")
+              " 2003-2024 PhiloSoft Design")
 
     if len(args) != 1:
         sys.stderr.write("Usage: set-title-list [-s] title_list_file\n")
@@ -112,6 +112,7 @@ def run():
 
     if changed:
         break_tree(root_folder.linear)
+        del root_folder.linear
         storage.store(root_folder)
 
     if changed and report_stats:
index b897078f70a19efff2bb0e15dbf46d2b69ec305d..9a108da3cc12d7567962010ab84fc51cdb35c3aa 100755 (executable)
@@ -113,6 +113,7 @@ def run():
 
     if changed:
         break_tree(root_folder.linear)
+        del root_folder.linear
         storage.store(root_folder)
 
     if changed and report_stats: