--- /dev/null
+#! /usr/local/bin/python -O
+"""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 <phd@phd.pp.ru>"
+__copyright__ = "Copyright (C) 2006 PhiloSoft Design"
+__license__ = "GNU GPL"
+
+import os, shelve
+from operator import itemgetter
+
+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):
+ if key.startswith('/'):
+ print key
+global_db.close()