2 Dump bookmarks db to a more readable FLAD after check_urls
4 Written by BroytMann, Oct 2000 - Jun 2002. Copyright (C) 2000-2002 PhiloSoft Design
9 from bkmk_objects import Writer
13 return time.strftime("%a %d %b %Y %T", time.localtime(int(s)))
16 class writer_flad_err(Writer):
17 filename = "bookmarks_db.errors"
19 def bookmark(self, b, level):
20 if not hasattr(b, "error"):
23 self.outfile.write("""
30 Comment: %s""" % (1, b.name, b.href, strftime(b.add_date), strftime(b.last_visit), strftime(b.last_modified), b.comment))
32 for attr_name, attr_out in (("error", "Error"), ("no_error", "NoError"),
33 ("moved", "Moved"), ("size", "Size"), ("md5", "Md5"),
34 ("real_title", "RealTitle"), ("test_time", "TestTime")):
35 if hasattr(b, attr_name):
36 self.outfile.write("\n%s: %s" % (attr_out, getattr(b, attr_name)))
38 if hasattr(b, "last_tested"):
39 self.outfile.write("\n%s: %s" % ("LastTested", strftime(getattr(b, "last_tested"))))
41 self.outfile.write("\n")