#! /bin/sh
+# Check bookmarks
+#
+# Convert bookmarks to DB, check URLS from the DB and convert DB
+# to different formats and back to bookmarks.
+#
+# This file is a part of Bookmarks database and Internet robot.
+#
+# __author__ = "Oleg Broytman <phd@phdru.name>"
+# __copyright__ = "Copyright (C) 2000-2012 PhiloSoft Design"
+# __license__ = "GNU GPL"
-PATH=$HOME/lib/bookmarks_db:$PATH
+PATH="$HOME/lib/bookmarks_db:$PATH"
-bkmk2db && \
+ln -s "$HOME"/Desktop/bookmarks-*.json bookmarks_db.json &&
+BKMK_STORAGE=json convert_st.py pickle &&
+rm bookmarks_db.json &&
-check_urls.py && \
-check_urls.py -e && \
+check_urls.py &&
+echo '' &&
+check_urls.py -e &&
# Report results
-BKMK_WRITER=flad db2bkmk.py && \
-check_dups.py -s -l bookmarks.err >/dev/null && \
-check_title.py > check_title.txt && \
-bkmk-sort && \
+BKMK_WRITER=flad db2bkmk.py &&
+check_dups.py -s -l bookmarks.err >/dev/null &&
+check_title.py > check_title.txt &&
+bkmk-sort &&
# Write results to the bookmarks files
+convert_st.py json &&
exec db2bkmk.py