3 Check and show URLs in the bookmarks database where name <> real title
5 Written by BroytMann. Copyright (C) 2002-2007 PhiloSoft Design.
9 from bkmk_objects import make_linear, quote_title, unquote_title
13 from getopt import getopt
14 optlist, args = getopt(sys.argv[1:], "s")
18 for _opt, _arg in optlist:
27 print "BroytMann check_title, Copyright (C) 2002-2007 PhiloSoft Design"
30 sys.stderr.write("check_title: too many arguments\n")
31 sys.stderr.write("Usage: check_title [-s]\n")
34 from storage import storage
38 sys.stdout.write("Loading %s: " % storage.filename)
41 root_folder = storage.load()
42 make_linear(root_folder)
43 objects = len(root_folder.linear)
49 for object_no in range(objects):
50 object = root_folder.linear[object_no]
53 if hasattr(object, "moved") or hasattr(object, "error"):
56 if hasattr(object, "real_title"):
57 quoted_title = unquote_title(quote_title(object.real_title))
58 unquoted_name = unquote_title(object.name)
59 if unquote_title(object.name) <> quoted_title:
67 print "NO REAL TITLE!!!"
72 print objects, "objects passed"
75 if __name__ == '__main__':