2 """Reload a dump into DB
4 This file is a part of XSetBg.
8 __author__ = "Oleg Broytman <phd@phdru.name>"
9 __copyright__ = "Copyright (C) 2007-2014 PhiloSoft Design"
10 __license__ = "GNU GPL"
13 from xsetbg_db import xsetbg_db_path
15 dump_file = open(sys.argv[1], 'rU')
17 xsetbg_db = shelve.open(xsetbg_db_path, flag='n')
18 for line in dump_file:
19 timestamp, filename = line.strip().split(None, 1)
20 xsetbg_db[filename] = float(timestamp)