]> git.phdru.name Git - bookmarks_db.git/commitdiff
Remotely sync and publish bookmarks in Mozilla format.
authorOleg Broytman <phd@phdru.name>
Sat, 4 Oct 2008 19:53:41 +0000 (19:53 +0000)
committerOleg Broytman <phd@phdru.name>
Sat, 4 Oct 2008 19:53:41 +0000 (19:53 +0000)
git-svn-id: file:///home/phd/archive/SVN/bookmarks_db/trunk@221 fdd5c36f-1aea-0310-aeeb-c58d7e2b6c23

bkmk-publish
bkmk-publish.old [new file with mode: 0755]
bkmk-rsync
bkmk-rsync.ns [new file with mode: 0755]
mz2ns

index f64ea3c8a00fa568acf693cb27a675e422d4f46f..4086628b358857e39392a3277e8e1ef0edd52dae 100755 (executable)
@@ -4,24 +4,13 @@ umask 077
 PATH=$HOME/lib/bookmarks_db:$PATH
 
 STARTDIR="`pwd`"
-bkmk-koi -c && \
-mv public-koi.tmp bkmk-koi.html && chmod a+r bkmk-koi.html || exit 1
+db2bkmk.py -p "Private links" -o bookmarks.html || exit 1
 
 echo "Splitting bookmarks..."
 cd $HOME/Internet/WWW/htdocs/phd.pp.ru/Bookmarks && \
 rm -rf split || exit 1
 
-$HOME/lib/bookmarks_db/hotexplode.pl -o split $STARTDIR/bookmarks.html && \
-cp -p ../../../misc/nopasswd-index.html split/privatelinks/index.html || exit 1
-
-cp -p $STARTDIR/bkmk-koi.html bookmarks.html && chmod -R a+rX . || exit 1
-
-#/usr/local/htdig/bkmk.sh
-
-cd $STARTDIR && \
-exec rm -f header bookmarks.err bookmarks_db.pickle bookmarks_db.flad \
-   private-win.tmp public-win.tmp bookmarks.html bookmark.ht0 bookmark.ht1 bkmk-koi.html
-
-#zip -9 bkmk bkmk-koi.html bkmk-win.html && \
-#rm -f bkmk-win.html && \
-#cp -p bookmark.ht1 bkmk-win.html || exit 1
+mv $STARTDIR/bookmarks.html . && \
+hotexplode.pl -o split bookmarks.html && \
+chmod -R a+rX . && \
+exec rm -f bookmarks_db.pickle
diff --git a/bkmk-publish.old b/bkmk-publish.old
new file mode 100755 (executable)
index 0000000..f64ea3c
--- /dev/null
@@ -0,0 +1,27 @@
+#! /bin/sh
+
+umask 077
+PATH=$HOME/lib/bookmarks_db:$PATH
+
+STARTDIR="`pwd`"
+bkmk-koi -c && \
+mv public-koi.tmp bkmk-koi.html && chmod a+r bkmk-koi.html || exit 1
+
+echo "Splitting bookmarks..."
+cd $HOME/Internet/WWW/htdocs/phd.pp.ru/Bookmarks && \
+rm -rf split || exit 1
+
+$HOME/lib/bookmarks_db/hotexplode.pl -o split $STARTDIR/bookmarks.html && \
+cp -p ../../../misc/nopasswd-index.html split/privatelinks/index.html || exit 1
+
+cp -p $STARTDIR/bkmk-koi.html bookmarks.html && chmod -R a+rX . || exit 1
+
+#/usr/local/htdig/bkmk.sh
+
+cd $STARTDIR && \
+exec rm -f header bookmarks.err bookmarks_db.pickle bookmarks_db.flad \
+   private-win.tmp public-win.tmp bookmarks.html bookmark.ht0 bookmark.ht1 bkmk-koi.html
+
+#zip -9 bkmk bkmk-koi.html bkmk-win.html && \
+#rm -f bkmk-win.html && \
+#cp -p bookmark.ht1 bkmk-win.html || exit 1
index 2de2b30da8981ce0d49d315ab75dbe650362195e..cc7034d5badf2d3893bec4c9acbcf677ea382597 100755 (executable)
@@ -1,8 +1,11 @@
 #! /bin/sh
 
 PATH=$HOME/lib/bookmarks_db:$PATH
+umask 077
 
-mz2ns
-mv bookmarks.html "$HOME/.netscape/bookmarks.html"
+bkmk2db || exit 1
+db2bkmk.py || exit 2
+diff $HOME/.mozilla/bookmarks.html bookmarks.html > diff.out
 
-exec distribute -r .netscape "$HOME/.netscape/bookmarks.html"
+distribute -r .mozilla bookmarks.html
+exec mv bookmarks.html "$HOME/.mozilla/bookmarks.html"
diff --git a/bkmk-rsync.ns b/bkmk-rsync.ns
new file mode 100755 (executable)
index 0000000..2de2b30
--- /dev/null
@@ -0,0 +1,8 @@
+#! /bin/sh
+
+PATH=$HOME/lib/bookmarks_db:$PATH
+
+mz2ns
+mv bookmarks.html "$HOME/.netscape/bookmarks.html"
+
+exec distribute -r .netscape "$HOME/.netscape/bookmarks.html"
diff --git a/mz2ns b/mz2ns
index 451c96e27fcbca6a308b45b43174815472ead25c..31a39d4cc08c76d5862f995d8111f32e55fe6a54 100755 (executable)
--- a/mz2ns
+++ b/mz2ns
@@ -1,12 +1,13 @@
 #! /bin/sh
 
 PATH=$HOME/lib/bookmarks_db:$PATH
+umask 077
 
 bkmk2db || exit 1
-umask 077
 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.$$ && \
 mv _tmp.$$ bookmarks.html
+
 exec diff $HOME/.netscape/bookmarks.html bookmarks.html > diff.out