X-Git-Url: https://git.phdru.name/?a=blobdiff_plain;ds=sidebyside;f=Writers%2Fbkmk_whtml.py;h=88889178611a81bb6436fdfded50ee3c2fcbc422;hb=44c9c00805ea0b158fa86b6774ad01306487266f;hp=918101d155a4dbbe828c352b9e697bbe6aeb4616;hpb=fdc0aa93ca48648782725d71c7edbb53c52e081b;p=bookmarks_db.git
diff --git a/Writers/bkmk_whtml.py b/Writers/bkmk_whtml.py
index 918101d..8888917 100644
--- a/Writers/bkmk_whtml.py
+++ b/Writers/bkmk_whtml.py
@@ -1,25 +1,21 @@
"""
Convert a bkmk database back to bookmarks.html
- Written by BroytMann. Copyright (C) 2000-2003 PhiloSoft Design
+ Written by BroytMann. Copyright (C) 2000-2007 PhiloSoft Design
"""
-
-import os
-NSFORMAT = os.environ.has_key("BKMK_NSFORMAT")
+from bkmk_objects import Writer, BKMK_FORMAT, quote_title
def dump_comment(comment):
comment = comment.replace("
\n", "\n")
- if NSFORMAT:
+ if BKMK_FORMAT == "NETSCAPE":
comment = comment.replace("\n", "
\n")
return comment
ind_s = " "*4
-from bkmk_objects import Writer
-
class writer_html(Writer):
filename = "bookmarks.html"
@@ -30,18 +26,25 @@ class writer_html(Writer):
def root_folder(self, f):
self.outfile.write("\n")
self.outfile.write(f.header + "\n")
- self.outfile.write('
\n") def bookmark(self, b, level): - self.outfile.write(ind_s*(level+1) + '