1 #! /usr/bin/env python3
2 """Dump the DB sorted by date
4 This file is a part of XSetBg.
9 from xsetbg_conf import xsetbg_conf
10 from xsetbg_db import xsetbg_db
13 sys.exit("Error: no database found")
15 fs_encoding = xsetbg_conf.get("images", "fs_encoding")
16 for row in xsetbg_db.select(orderBy='-last_shown'):
17 sys.stdout.buffer.write(
18 ('%d %s %s\n' % (row.id, row.last_shown, row.full_name
19 )).encode(fs_encoding)