X-Git-Url: https://git.phdru.name/?a=blobdiff_plain;f=set-title-list.py;h=bd540591c51ded3e01b79b3929c402e1d9898b6e;hb=3c9507aec371fb56916d3a91e3c41efc29d40900;hp=e5d6f22ca39ffbb33bc92ec8dc86f6f2e509820a;hpb=d9f893f73fa453a69b17cb4283f18c052ae29b21;p=bookmarks_db.git diff --git a/set-title-list.py b/set-title-list.py index e5d6f22..bd54059 100755 --- a/set-title-list.py +++ b/set-title-list.py @@ -1,10 +1,15 @@ -#! /usr/local/bin/python -O -""" - Run through the bookmarks database and set names to titles from an external file +#! /usr/bin/env python +"""Run through the bookmarks database and set names to titles from an external file - Written by BroytMann, May 2003 - May 2003. Copyright (C) 2003 PhiloSoft Design +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) 2003-2011 PhiloSoft Design" +__license__ = "GNU GPL" import sys @@ -24,7 +29,7 @@ def run(): pass if report_stats: - print "BroytMann set-title-list, Copyright (C) 2003 PhiloSoft Design" + print "Broytman set-title-list, Copyright (C) 2003-2007 PhiloSoft Design" if len(args) <> 1: sys.stderr.write("Usage: set-title-list [-s] title_list_file\n") @@ -71,7 +76,7 @@ def run(): sys.stdout.flush() root_folder = storage.load() - from bkmk_objects import make_linear + from bkmk_objects import make_linear, break_tree make_linear(root_folder) objects = len(root_folder.linear) @@ -102,6 +107,7 @@ def run(): sys.stdout.flush() if changed: + break_tree(root_folder.linear) storage.store(root_folder) if changed and report_stats: