#! /usr/bin/env python
-"""Count all and shown files; display the date of oldest file
+"""Display stats: shown and non-shown files; oldest and newest and so on
This file is a part of XSetBg.
print "Total files:", xsetbg_db.select().count()
print "Shown files:", xsetbg_db.select('last_shown IS NOT NULL').count()
+print "Not shown files:", xsetbg_db.select('last_shown IS NULL').count()
last_shown = xsetbg_db.select('last_shown IS NOT NULL',
orderBy='last_shown')[0].last_shown
print "Oldest:", asctime(localtime(last_shown))
+min_max = xsetbg_db.select().accumulateMany(('MIN', 'id'), ('MAX', 'id'))
+print "Min id:", min_max[0]
+print "Max id:", min_max[1]