X-Git-Url: https://git.phdru.name/?p=bookmarks_db.git;a=blobdiff_plain;f=convert_st.py;h=c8a6a240fe08b7f1c9b879c4167422d672ef5b21;hp=bba98e9a29f5ce2f21a7e81d8cf54cb65313727b;hb=96e39d55c791326368ff14d538850e14ba5a2c97;hpb=fb5c3b2b91aeeb615d6d6d890491af3fdff69556 diff --git a/convert_st.py b/convert_st.py index bba98e9..c8a6a24 100755 --- a/convert_st.py +++ b/convert_st.py @@ -1,10 +1,12 @@ -#! /usr/local/bin/python -O -""" - Convert a bkmk database to a different storage. +#! /usr/bin/env python +"""Convert a bkmk database to a different storage. - Written by BroytMann, Apr 2000 - Aug 2002. Copyright (C) 2000-2002 PhiloSoft Design +This file is a part of Bookmarks database and Internet robot. """ +__author__ = "Oleg Broytman " +__copyright__ = "Copyright (C) 2000-2012 PhiloSoft Design" +__license__ = "GNU GPL" import sys @@ -28,10 +30,14 @@ def run(): sys.stderr.write("Usage: convert_st [-s] new_storage\n") sys.exit(1) + from bkmk_objects import parse_params, set_params from storage import storage, import_storage + storage = storage() - new_storage = import_storage(args[0]) + storage_name, storage_params = parse_params(args[0]) + new_storage = import_storage(storage_name) + set_params(new_storage, storage_params) new_storage = new_storage() if report_stats: