X-Git-Url: https://git.phdru.name/?a=blobdiff_plain;f=Writers%2Fbkmk_wflad.py;h=cae46bb44554c1e79a54a32bd1d1ac72e80ab307;hb=f84406ac3fd5b69919ff801e1db82a56a7186a10;hp=64542bbdf929f262cc4d3af089de498a2fc8adf4;hpb=c2ea4e82718b903aa123dd77490f36657383b0ca;p=bookmarks_db.git diff --git a/Writers/bkmk_wflad.py b/Writers/bkmk_wflad.py index 64542bb..cae46bb 100644 --- a/Writers/bkmk_wflad.py +++ b/Writers/bkmk_wflad.py @@ -12,6 +12,7 @@ __all__ = ['writer_flad'] import time from bkmk_objects import Writer +from compat import unicode def strftime(s): @@ -35,7 +36,10 @@ Folder: %s AddDate: %s Comment: %s LastModified: %s -""" % (level, f.name, strftime(f.add_date), f.comment, strftime(f.last_modified))) +""" % ( + level, f.name, strftime(f.add_date), f.comment, + strftime(f.last_modified)) + ) def bookmark(self, b, level): self.outfile.write(""" @@ -46,7 +50,11 @@ AddDate: %s LastVisit: %s LastModified: %s 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)) +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"), @@ -56,12 +64,12 @@ Comment: %s""" % (level+1, b.name, b.href, strftime(b.add_date), strftime(b.last ): if hasattr(b, attr_name): value = getattr(b, attr_name) - if isinstance(value, unicode): - value = value.encode('utf-8') + #if isinstance(value, unicode): + # value = value.encode('utf-8') self.outfile.write("\n%s: %s" % (attr_out, value)) if hasattr(b, "last_tested"): - self.outfile.write("\n%s: %s" % ("LastTested", strftime(getattr(b, "last_tested")))) + self.outfile.write("\nLastTested: %s" % strftime(b.last_tested)) self.outfile.write("\n")