diff --git a/dwtt b/dwtt index f20e4ad..17da4aa 100755 --- a/dwtt +++ b/dwtt @@ -1,5 +1,6 @@ #!/usr/bin/env python +import os import sys import getopt from datetime import datetime @@ -11,7 +12,7 @@ from DataStore import DataStore PROGRAM_NAME = 'dwtt' def usage(): - print '''Usage: dwtt [options] + print '''Usage: dwtt [options] [dbfile] Options: --help Show this help ''' @@ -33,10 +34,9 @@ def main(argv): usage() sys.exit(3) - if len(args) < 1: - usage() - sys.exit(2) - timedbfile = args[0] + timedbfile = os.path.expanduser('~') + os.path.sep + '.dwtt.db' + if len(args) >= 1: + timedbfile = args[0] ds = DataStore(timedbfile)