]> git.phdru.name Git - xsetbg.git/commitdiff
Feat: Print (non-)images counts
authorOleg Broytman <phd@phdru.name>
Mon, 20 Aug 2018 14:52:08 +0000 (17:52 +0300)
committerOleg Broytman <phd@phdru.name>
Mon, 20 Aug 2018 14:52:08 +0000 (17:52 +0300)
print-stats.py

index 415688edcb394ca6780ac17d5794af992bb5e94b..4e1770dddeef017a58546de6647990adad78eb6a 100755 (executable)
@@ -13,6 +13,9 @@ if not xsetbg_db:
     sys.exit("Error: no database found")
 
 print "Total files:", xsetbg_db.select().count()
+print "Images:", xsetbg_db.select('is_image = 1').count()
+print "Non-images:", xsetbg_db.select('is_image = 0').count()
+print "Unknown:", xsetbg_db.select('is_image IS NULL').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',