X-Git-Url: https://git.phdru.name/?a=blobdiff_plain;f=print_all.py;h=e67c642d0e2ccc247db22524cba568998fa07e6b;hb=666424147b909d29d979d45990aa967e117f6cec;hp=19d5a942760a079216288b731198a450ce550542;hpb=8038c52473c74084974d2fa6116bacf8bbee774e;p=xsetbg.git diff --git a/print_all.py b/print_all.py index 19d5a94..e67c642 100755 --- a/print_all.py +++ b/print_all.py @@ -1,28 +1,18 @@ -#! /usr/local/bin/python -O +#! /usr/bin/env python """Print shown files sorted by date This file is a part of XSetBg. """ -__version__ = "$Revision$"[11:-2] -__revision__ = "$Id$"[5:-2] -__date__ = "$Date$"[7:-2] - -__author__ = "Oleg BroytMann " -__copyright__ = "Copyright (C) 2006 PhiloSoft Design" +__author__ = "Oleg Broytman " +__copyright__ = "Copyright (C) 2006-2014 PhiloSoft Design" __license__ = "GNU GPL" -import os, shelve from operator import itemgetter +from xsetbg_db import xsetbg_db -xsetbg_dir = os.path.join(os.environ["HOME"], "lib", "xsetbg") -os.chdir(xsetbg_dir) - -global_db_name = "xsetbg.db" - -global_db = shelve.open(global_db_name, flag='r') -for key, value in sorted(global_db.items(), key=itemgetter(1), reverse=1): +for key, value in sorted(xsetbg_db.items(), key=itemgetter(1), reverse=1): if key.startswith('/'): print key -global_db.close() +xsetbg_db.close()