]> git.phdru.name Git - bookmarks_db.git/commitdiff
Feat(Writers/bkmk_whtml): Mark special folders
authorOleg Broytman <phd@phdru.name>
Tue, 6 Aug 2024 06:16:46 +0000 (09:16 +0300)
committerOleg Broytman <phd@phdru.name>
Tue, 6 Aug 2024 06:18:53 +0000 (09:18 +0300)
Writers/bkmk_whtml.py

index 06fb9cf2049fe108cbf125dda42ae2d5b07ed262..05d9847ad148d3f5e3458bfb0022e6647bf7b15b 100644 (file)
@@ -39,8 +39,13 @@ 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":
+            if f.last_modified:
+                self.outfile.write(' LAST_MODIFIED="%s"' % f.last_modified)
+            if (f.guid == "toolbar_____") or (f.name == "Bookmarks Toolbar"):
+                self.outfile.write(' PERSONAL_TOOLBAR_FOLDER="true"')
+            if (f.guid == "unfiled_____") or (f.name == "Other Bookmarks"):
+                self.outfile.write(' UNFILED_BOOKMARKS_FOLDER="true"')
         self.outfile.write('>%s</H3>\n' % quote_title(f.name))
         self._folder(f, level)