]> git.phdru.name Git - xsetbg.git/blob - dump_db.py
Fix(DB): Fix column encoding
[xsetbg.git] / dump_db.py
1 #! /usr/bin/env python
2 """Dump the DB sorted by date
3
4 This file is a part of XSetBg.
5
6 """
7
8 import sys
9 from m_lib.defenc import default_encoding
10 from xsetbg_db import xsetbg_db
11
12 if not xsetbg_db:
13     sys.exit("Error: no database found")
14
15 for row in xsetbg_db.select(orderBy='-last_shown'):
16     print row.id, row.last_shown, row.full_name.encode(default_encoding)