X-Git-Url: https://git.phdru.name/?a=blobdiff_plain;f=convert_st.py;h=005710b8067d558fff6f20953640d21014404a4e;hb=c1c90856aeffcf8f2bcb7abf39934d5e0f8be36d;hp=c0ea8cb5f3dcceb3397dcd37093c65c75048d797;hpb=832eb757ef7f81abf1e431ce16f368c10dd57962;p=bookmarks_db.git diff --git a/convert_st.py b/convert_st.py index c0ea8cb..005710b 100755 --- a/convert_st.py +++ b/convert_st.py @@ -4,11 +4,8 @@ This file is a part of Bookmarks database and Internet robot. """ -__version__ = "$Revision$"[11:-2] -__revision__ = "$Id$"[5:-2] -__date__ = "$Date$"[7:-2] __author__ = "Oleg Broytman " -__copyright__ = "Copyright (C) 2000-2011 PhiloSoft Design" +__copyright__ = "Copyright (C) 2000-2017 PhiloSoft Design" __license__ = "GNU GPL" import sys @@ -33,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: @@ -46,14 +47,14 @@ def run(): root_folder = storage.load() if report_stats: - print "Ok" + print("Ok") sys.stdout.write("Converting to %s: " % new_storage.filename) sys.stdout.flush() new_storage.store(root_folder) if report_stats: - print "Ok" + print("Ok") if __name__ == '__main__':