"""
+import os
+NSFORMAT = os.environ.has_key("BKMK_NSFORMAT")
+
+
def dump_comment(comment):
- return comment.replace("<BR>", "<BR>\n")
+ comment = comment.replace("<BR>\n", "\n")
+ if NSFORMAT:
+ comment = comment.replace("\n", "<BR>\n")
+ return comment
ind_s = " "*4
self.outfile.write(ind_s*level + "<DL><p>\n")
def root_folder(self, f):
- header = f.header.replace(".", ".\n")
- header = header.replace("<T", "\n<T", 3)
self.outfile.write("<!DOCTYPE NETSCAPE-Bookmark-file-1>\n")
- self.outfile.write(header + "\n")
+ self.outfile.write(f.header + "\n")
self.outfile.write('<H1>%s</H1>\n\n' % f.name)
self._folder(f, 0)
PATH=$HOME/lib/bookmarks_db:$PATH
bkmk2db || exit 1
-db2bkmk.py || exit 2
+BKMK_NSFORMAT=TRUE db2bkmk.py || exit 2
sed -e 's/</</g' -e 's/>/>/g' -e 's/"/"/g' -e 's/&/\&/g' \
bookmarks.html >_tmp.$$ && \