X-Git-Url: https://git.phdru.name/?a=blobdiff_plain;f=Writers%2Fbkmk_wflad.py;h=0a94fd8e93652d9727ddc270dcaf787093fad591;hb=5b117d30a94f2419853bab627734f7db6a76f3da;hp=dc46a8349100fa2501f4d963850ceb35ad970e31;hpb=fb5c3b2b91aeeb615d6d6d890491af3fdff69556;p=bookmarks_db.git diff --git a/Writers/bkmk_wflad.py b/Writers/bkmk_wflad.py index dc46a83..0a94fd8 100644 --- a/Writers/bkmk_wflad.py +++ b/Writers/bkmk_wflad.py @@ -1,7 +1,7 @@ """ - Dump bookmarks db to a more readable FLAD after check_urls + Dump bookmarks db to a more readable FLat Ascii Database - Written by BroytMann, Apr 2000 - Jun 2002. Copyright (C) 2000-2002 PhiloSoft Design + Written by Broytman. Copyright (C) 2000-2010 PhiloSoft Design. """ @@ -12,7 +12,7 @@ from bkmk_objects import Writer def strftime(s): try: return time.strftime("%a %d %b %Y %T", time.localtime(int(s))) - except ValueError: # s is already formatted + except (TypeError, ValueError): # s is None or is already formatted return s @@ -30,7 +30,8 @@ Level: %d Folder: %s AddDate: %s Comment: %s -""" % (level, f.name, strftime(f.add_date), f.comment)) +LastModified: %s +""" % (level, f.name, strftime(f.add_date), f.comment, f.last_modified or '')) def bookmark(self, b, level): @@ -41,11 +42,13 @@ URL: %s AddDate: %s LastVisit: %s LastModified: %s -Comment: %s""" % (level+1, b.name, b.href, strftime(b.add_date), strftime(b.last_visit), strftime(b.last_modified), b.comment)) +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")): + ("real_title", "RealTitle"), ("test_time", "TestTime"), + ("icon_href", "IconURI"), ("icon", "Icon"), ("charset", "Charset")): if hasattr(b, attr_name): self.outfile.write("\n%s: %s" % (attr_out, getattr(b, attr_name)))