]> git.phdru.name Git - bookmarks_db.git/blobdiff - Writers/bkmk_whtml.py
Renamed BKMK_??FORMAT to BKMK_FORMAT.
[bookmarks_db.git] / Writers / bkmk_whtml.py
index 3fe863719d94851385d7f8b4e544fb4376e9ff90..7e652d2e7dc5f84f4300f9aaf3298a69667454ae 100644 (file)
@@ -6,16 +6,12 @@
 
 
 import os
-MZFORMAT = os.environ.has_key("BKMK_MZFORMAT")
-if MZFORMAT:
-   NSFORMAT = True
-else:
-   NSFORMAT = os.environ.has_key("BKMK_NSFORMAT")
+BKMK_FORMAT = os.environ.has_key("BKMK_FORMAT")
 
 
 def dump_comment(comment):
    comment = comment.replace("<BR>\n", "\n")
-   if NSFORMAT:
+   if BKMK_FORMAT == "NETSCAPE":
       comment = comment.replace("\n", "<BR>\n")
    return comment
 
@@ -39,7 +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 MZFORMAT 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' % f.name)
       self._folder(f, level)
 
@@ -48,7 +44,7 @@ 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 MZFORMAT:
+      if BKMK_FORMAT == "MOZILLA":
          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)