From 04e6a24bf50fa9a11f5de27fe660a8a461c0d5d6 Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Wed, 24 Jul 2024 05:05:56 +0300 Subject: [PATCH] Feat: Skip URLs that have '%s' --- bkmk-chk | 2 +- check_redirects.py | 10 ++++++---- check_title.py | 10 ++++++---- 3 files changed, 13 insertions(+), 9 deletions(-) diff --git a/bkmk-chk b/bkmk-chk index c18158d..60821e1 100755 --- a/bkmk-chk +++ b/bkmk-chk @@ -23,8 +23,8 @@ check_urls_db.py -e && # Report results BKMK_WRITER=flad db2bkmk.py && check_dups.py -s -l check_dups.txt >/dev/null && -check_title.py -s -l check_title.txt && check_redirects.py -s -l check_redirects.txt && +check_title.py -s -l check_title.txt && bkmk-sort && # Write results to the bookmarks files diff --git a/check_redirects.py b/check_redirects.py index ef7a505..c9753ab 100755 --- a/check_redirects.py +++ b/check_redirects.py @@ -10,7 +10,7 @@ from bkmk_objects import make_linear __author__ = "Oleg Broytman " -__copyright__ = "Copyright (C) 2023 PhiloSoft Design" +__copyright__ = "Copyright (C) 2023, 2024 PhiloSoft Design" __license__ = "GNU GPL" @@ -40,7 +40,7 @@ def run(): pass if report_stats: - print("Broytman check_redirects, Copyright (C) 2023 PhiloSoft Design") + print("Broytman check_redirects, Copyright (C) 2023, 2024 PhiloSoft Design") if args: sys.stderr.write("check_redirects: too many arguments\n") @@ -69,8 +69,10 @@ def run(): object = root_folder.linear[object_no] if object.isBookmark: - if hasattr(object, "error") or \ - object.href.startswith('place:'): # Firefox SmartBookmarks + if (hasattr(object, "error") or + object.href.startswith('place:') # Firefox SmartBookmarks + or ('%s' in object.href) + ): continue if hasattr(object, "moved"): diff --git a/check_title.py b/check_title.py index 0bb1060..271af9b 100755 --- a/check_title.py +++ b/check_title.py @@ -10,7 +10,7 @@ from bkmk_objects import make_linear, quote_title, unquote_title __author__ = "Oleg Broytman " -__copyright__ = "Copyright (C) 2002-2023 PhiloSoft Design" +__copyright__ = "Copyright (C) 2002-2024 PhiloSoft Design" __license__ = "GNU GPL" @@ -44,7 +44,7 @@ def run(): pass if report_stats: - print("Broytman check_title, Copyright (C) 2002-2023 PhiloSoft Design") + print("Broytman check_title, Copyright (C) 2002-2024 PhiloSoft Design") if args: sys.stderr.write("check_title: too many arguments\n") @@ -73,8 +73,10 @@ def run(): object = root_folder.linear[object_no] if object.isBookmark: - if hasattr(object, "moved") or hasattr(object, "error") or \ - object.href.startswith('place:'): # Firefox SmartBookmarks + if (hasattr(object, "moved") or hasattr(object, "error") or + object.href.startswith('place:') # Firefox SmartBookmarks + or ('%s' in object.href) + ): continue if hasattr(object, "real_title") \ -- 2.39.5