"""
__author__ = "Oleg Broytman <phd@phdru.name>"
-__copyright__ = "Copyright (C) 2000-2017 PhiloSoft Design"
+__copyright__ = "Copyright (C) 2000-2023 PhiloSoft Design"
__license__ = "GNU GPL"
__all__ = ['robot_forking']
stop_subp(log)
check_subp = Subprocess("%s/Robots/bkmk_rforking_sub.py" % os.path.dirname(sys.argv[0]),
- control_stderr=True)
+ control_stderr=True)
subp_pipe = RecordFile(check_subp)
if check_subp.waitForPendingChar(60): # wait a minute
new_b = pickle.loads(subp_pipe.read_record())
- for attr in ("error", "no_error",
- "moved", "size", "md5", "real_title",
- "last_tested", "last_modified", "test_time",
- "icon", "icon_href"):
+ for attr in (
+ "error", "no_error",
+ "moved", "size", "md5", "real_title",
+ "last_tested", "last_modified", "test_time",
+ "icon", "icon_href",
+ ):
if hasattr(new_b, attr):
setattr(bookmark, attr, getattr(new_b, attr))
else:
if record.has_key("URL"):
comment = record["Comment"].replace("\\n", '\n')
- bookmark = Bookmark(record["URL"], record["AddDate"],
- record["LastVisit"], record["LastModified"],
- record["Keyword"], comment)
+ bookmark = Bookmark(
+ record["URL"], record["AddDate"],
+ record["LastVisit"], record["LastModified"],
+ record["Keyword"], comment)
bookmark.name = record["Title"]
self.current_folder.append(bookmark)
"""
__author__ = "Oleg Broytman <phd@phdru.name>"
-__copyright__ = "Copyright (C) 2000-2017 PhiloSoft Design"
+__copyright__ = "Copyright (C) 2000-2023 PhiloSoft Design"
__license__ = "GNU GPL"
__all__ = ['writer_flad']
Keyword: %s
Comment: %s""" % (level+1, b.name, b.href, strftime(b.add_date), strftime(b.last_visit), strftime(b.last_modified), b.keyword, b.comment))
- for attr_name, attr_out in (("error", "Error"), ("no_error", "NoError"),
- ("moved", "Moved"), ("size", "Size"), ("md5", "Md5"),
- ("real_title", "RealTitle"), ("test_time", "TestTime"),
- ("icon_href", "IconURI"), ("icon", "Icon"), ("charset", "Charset")):
+ for attr_name, attr_out in (
+ ("error", "Error"), ("no_error", "NoError"),
+ ("moved", "Moved"), ("size", "Size"), ("md5", "Md5"),
+ ("real_title", "RealTitle"), ("test_time", "TestTime"),
+ ("icon_href", "IconURI"), ("icon", "Icon"), ("charset", "Charset"),
+ ):
if hasattr(b, attr_name):
value = getattr(b, attr_name)
if isinstance(value, unicode):
__license__ = "GNU GPL"
__all__ = ['Folder', 'Bookmark', 'Ruler', 'Walker', 'Writer', 'Robot',
- 'InverseLinker', 'Linear', 'make_linear', 'make_tree', 'break_tree',
- 'quote_title', 'unquote_title', 'parse_params', 'set_params',
+ 'InverseLinker', 'Linear', 'make_linear', 'make_tree', 'break_tree',
+ 'quote_title', 'unquote_title', 'parse_params', 'set_params',
]
isBookmark = 1
def __init__(self, href, add_date, last_visit=None, last_modified=None,
- keyword=None, comment='', icon_href=None, icon=None,
- charset=None, parser_charset=None):
+ keyword=None, comment='', icon_href=None, icon=None,
+ charset=None, parser_charset=None):
protocol, request = urllib.splittype(href)
user, password, port = None, None, None
host, path = urllib.splithost(request)
"""
__author__ = "Oleg Broytman <phd@phdru.name>"
-__copyright__ = "Copyright (C) 1997-2017 PhiloSoft Design"
+__copyright__ = "Copyright (C) 1997-2023 PhiloSoft Design"
__license__ = "GNU GPL"
__all__ = ['BkmkParser']
debug("Bookmark points to: `%s'" % href)
bookmark = Bookmark(href, add_date, last_visit, last_modified,
- keyword=keyword, icon=icon,
- charset=charset, parser_charset=self.charset or default_encoding)
+ keyword=keyword, icon=icon, charset=charset,
+ parser_charset=self.charset or default_encoding)
self.current_object = bookmark
self.current_folder.append(bookmark)
self.urls += 1
if checked.has_key(href):
log("Already checked %s" % href)
old_object = root_folder.linear[checked[href]]
- for attr_name in ("last_visit", "last_modified",
- "error", "no_error", "moved", "size", "md5", "real_title",
- "last_tested", "test_time", "icon", "charset"):
+ for attr_name in (
+ "last_visit", "last_modified",
+ "error", "no_error", "moved", "size", "md5", "real_title",
+ "last_tested", "test_time", "icon", "charset",
+ ):
if hasattr(old_object, attr_name):
setattr(object, attr_name, getattr(old_object, attr_name))
else: