- from getopt import getopt
- optlist, args = getopt(sys.argv[1:], "s")
+ from getopt import getopt
+ optlist, args = getopt(sys.argv[1:], "s")
- if args:
- sys.stderr.write("check_title: too many arguments\n")
- sys.stderr.write("Usage: check_title [-s]\n")
- sys.exit(1)
+ if args:
+ sys.stderr.write("check_title: too many arguments\n")
+ sys.stderr.write("Usage: check_title [-s]\n")
+ sys.exit(1)
- root_folder = storage.load()
- make_linear(root_folder)
- objects = len(root_folder.linear)
+ root_folder = storage.load()
+ make_linear(root_folder)
+ objects = len(root_folder.linear)
- if object.isBookmark:
- if hasattr(object, "moved") or hasattr(object, "error") \
- or object.href.startswith('place:'): # Firefox SmartBookmarks
- continue
+ if object.isBookmark:
+ if hasattr(object, "moved") or hasattr(object, "error") \
+ or object.href.startswith('place:'): # Firefox SmartBookmarks
+ continue
- if hasattr(object, "real_title") and (object.real_title is not None):
- unquoted_title = unquote_title(quote_title(object.real_title))
- unquoted_name = unquote_title(object.name)
- if unquoted_name != unquoted_title:
- print(object.href)
- print(unquoted_name)
- print(unquoted_title)
- print()
- else:
- print(object.href)
- print(object.name)
- print("NO REAL TITLE!!!")
- print()
+ if hasattr(object, "real_title") and (object.real_title is not None):
+ unquoted_title = unquote_title(quote_title(object.real_title))
+ unquoted_name = unquote_title(object.name)
+ if unquoted_name != unquoted_title:
+ print(object.href)
+ print(unquoted_name)
+ print(unquoted_title)
+ print()
+ else:
+ print(object.href)
+ print(object.name)
+ print("NO REAL TITLE!!!")
+ print()