]> git.phdru.name Git - bookmarks_db.git/blobdiff - Writers/bkmk_whtml.py
Store icon and charset in bookmark's attributes.
[bookmarks_db.git] / Writers / bkmk_whtml.py
index eba924705dc00a72d0bc60f39c1cda9b49455f43..f2986fd4577ffed773740ef2fe5092d287cdfc6d 100644 (file)
@@ -1,7 +1,7 @@
 """
    Convert a bkmk database back to bookmarks.html
 
-   Written by BroytMann. Copyright (C) 2000-2004 PhiloSoft Design
+   Written by BroytMann. Copyright (C) 2000-2007 PhiloSoft Design
 """
 
 
@@ -35,8 +35,7 @@ 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 f.last_modified:
-         self.outfile.write(' LAST_MODIFIED="%s"' % f.last_modified)
+      if f.last_modified: self.outfile.write(' LAST_MODIFIED="%s"' % f.last_modified)
       self.outfile.write('>%s</H3>\n' % f.name)
       self._folder(f, level)
 
@@ -46,6 +45,8 @@ class writer_html(Writer):
    def bookmark(self, b, level):
       self.outfile.write(ind_s*(level+1) + '<DT><A HREF="%s" ADD_DATE="%s" LAST_VISIT="%s" LAST_MODIFIED="%s"' % (b.href, b.add_date, b.last_visit, b.last_modified))
       if b.keyword: self.outfile.write(' SHORTCUTURL="%s"' % b.keyword)
+      if b.icon: self.outfile.write(' ICON="%s"' % b.icon)
+      if b.charset: self.outfile.write(' LAST_CHARSET="%s"' % b.charset)
       self.outfile.write('>%s</A>\n' % b.name)
       if b.comment: self.outfile.write('<DD>%s\n' % dump_comment(b.comment))