]> git.phdru.name Git - bookmarks_db.git/blobdiff - Writers/bkmk_whtml.py
Fix(Py3): Fix `list.join(separator)`
[bookmarks_db.git] / Writers / bkmk_whtml.py
index f7a1d654a2274780cb2284cf64040926e10f8a27..09d99894935d180d78ce2608be8fc611287a56d5 100644 (file)
@@ -4,14 +4,14 @@ This file is a part of Bookmarks database and Internet robot.
 """
 
 __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_html']
 
 
-from m_lib.defenc import default_encoding
 from bkmk_objects import Writer, BKMK_FORMAT, quote_title
+from compat import unicode
 
 
 def dump_comment(comment):
@@ -20,8 +20,10 @@ def dump_comment(comment):
         comment = comment.replace("\n", "<BR>\n")
     return comment
 
+
 ind_s = " "*4
 
+
 class writer_html(Writer):
     filename = "bookmarks.html"
 
@@ -37,7 +39,8 @@ class writer_html(Writer):
 
     def start_folder(self, f, level):
         self.outfile.write(ind_s*level + '<DT><H3 ADD_DATE="%s"' % f.add_date)
-        if (BKMK_FORMAT == "MOZILLA") and f.last_modified: self.outfile.write(' LAST_MODIFIED="%s"' % f.last_modified)
+        if (BKMK_FORMAT == "MOZILLA") and f.last_modified:
+            self.outfile.write(' LAST_MODIFIED="%s"' % f.last_modified)
         self.outfile.write('>%s</H3>\n' % quote_title(f.name))
         self._folder(f, level)
 
@@ -45,7 +48,8 @@ class writer_html(Writer):
         self.outfile.write(ind_s*level + "</DL><p>\n")
 
     def bookmark(self, b, level):
-        self.outfile.write(ind_s*(level+1) + '<DT><A HREF="%s" ADD_DATE="%s"' % (b.href, b.add_date))
+        self.outfile.write(ind_s*(level+1) + '<DT><A HREF="%s" ADD_DATE="%s"'
+                           % (b.href, b.add_date))
         if b.last_visit: self.outfile.write(' LAST_VISIT="%s"' % b.last_visit)
         if b.last_modified:
             self.outfile.write(' LAST_MODIFIED="%s"' % b.last_modified)