]> git.phdru.name Git - bookmarks_db.git/commitdiff
Renamed BKMK_??FORMAT to BKMK_FORMAT.
authorOleg Broytman <phd@phdru.name>
Sun, 14 Oct 2007 10:06:51 +0000 (10:06 +0000)
committerOleg Broytman <phd@phdru.name>
Sun, 14 Oct 2007 10:06:51 +0000 (10:06 +0000)
git-svn-id: file:///home/phd/archive/SVN/bookmarks_db/trunk@96 fdd5c36f-1aea-0310-aeeb-c58d7e2b6c23

Writers/bkmk_whtml.py
bkmk-chk
bkmk-koi
bkmk-win
mz2ns

index 775d336fea0c4060a35090c307f8be12cfe20311..7e652d2e7dc5f84f4300f9aaf3298a69667454ae 100644 (file)
@@ -6,16 +6,12 @@
 
 
 import os
-MZFORMAT = os.environ.has_key("BKMK_MZFORMAT")
-if MZFORMAT:
-   NSFORMAT = False
-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)
index 5354ac9b9bd0b76c5071775d247a0889987d7303..b9f663743f676b0d1bda9f1de202458b3d743277 100755 (executable)
--- a/bkmk-chk
+++ b/bkmk-chk
@@ -12,4 +12,4 @@ BKMK_WRITER=flad db2bkmk.py || exit 1
 check_dups.py -s -l bookmarks.err || exit 1
 
 # Write results to output bookmarks files
-BKMK_MZFORMAT=TRUE db2bkmk.py || exit 1
+BKMK_FORMAT=MOZILLA db2bkmk.py || exit 1
index 24b378de8bc34b1273f3117c669cc3e9cc74bbc7..bc073e80dbb928d7439956ed08fc661f69d56ff4 100755 (executable)
--- a/bkmk-koi
+++ b/bkmk-koi
@@ -5,8 +5,8 @@ PATH=$HOME/lib/bookmarks_db:$PATH
 
 bkmk2db || exit 1
 
-BKMK_NSFORMAT=TRUE
-export BKMK_NSFORMAT
+BKMK_FORMAT=NETSCAPE
+export BKMK_FORMAT
 
 db2bkmk.py || exit 1
 db2bkmk.py -p "Private links" -o public-koi.tmp || exit 1
index 6c536ea3c24a538860c03a05b44d26de68f6425b..5e5739a6115f2fc5f7f80642a1b4175f226bf723 100755 (executable)
--- a/bkmk-win
+++ b/bkmk-win
@@ -12,8 +12,8 @@ fromwin < bookmark.htm > bookmarks.html || exit 1
 
 bkmk2db || exit 1
 
-BKMK_NSFORMAT=TRUE
-export BKMK_NSFORMAT
+BKMK_FORMAT=NETSCAPE
+export BKMK_FORMAT
 
 db2bkmk.py -o private-win.tmp || exit 1
 db2bkmk.py -p "Private links" -o public-win.tmp || exit 1
diff --git a/mz2ns b/mz2ns
index f6de0903e1abacc3dd1e55540c35483c3e99ae21..451c96e27fcbca6a308b45b43174815472ead25c 100755 (executable)
--- a/mz2ns
+++ b/mz2ns
@@ -4,7 +4,7 @@ PATH=$HOME/lib/bookmarks_db:$PATH
 
 bkmk2db || exit 1
 umask 077
-BKMK_NSFORMAT=TRUE db2bkmk.py || exit 2
+BKMK_FORMAT=NETSCAPE db2bkmk.py || exit 2
 
 sed -e 's/&lt;/</g' -e 's/&gt;/>/g' -e 's/&quot;/"/g' -e 's/&amp;/\&/g' \
    bookmarks.html >_tmp.$$ && \