From: Oleg Broytman Date: Mon, 19 Dec 2011 22:40:43 +0000 (+0000) Subject: Write netscape-formatted datetime. X-Git-Tag: v4.5.3~21 X-Git-Url: https://git.phdru.name/?a=commitdiff_plain;h=5a17d1ea6aea7592d0fb3db5df19919cf2b1163e;p=bookmarks_db.git Write netscape-formatted datetime. git-svn-id: file:///home/phd/archive/SVN/bookmarks_db/trunk@355 fdd5c36f-1aea-0310-aeeb-c58d7e2b6c23 --- diff --git a/Writers/bkmk_whtml.py b/Writers/bkmk_whtml.py index ad109f8..1e933fa 100644 --- a/Writers/bkmk_whtml.py +++ b/Writers/bkmk_whtml.py @@ -23,6 +23,11 @@ def dump_comment(comment): comment = comment.replace("\n", "
\n") return comment +def netscape_date(date): + if not date or (BKMK_FORMAT == "MOZILLA"): + return date + else: + return int(date)/(10**6) ind_s = " "*4 @@ -40,8 +45,8 @@ class writer_html(Writer): self._folder(f, 0) def start_folder(self, f, level): - self.outfile.write(ind_s*level + '

%s

\n' % quote_title(f.name)) self._folder(f, level) @@ -49,9 +54,9 @@ class writer_html(Writer): self.outfile.write(ind_s*level + "

\n") def bookmark(self, b, level): - self.outfile.write(ind_s*(level+1) + '