added --version option

Every program should have this, really.
This commit is contained in:
hut 2013-02-21 20:50:08 +01:00
parent 295723ee8f
commit 4dc60e4f1e

View File

@ -163,7 +163,7 @@ class AnkiApp(QApplication):
def parseArgs(argv): def parseArgs(argv):
"Returns (opts, args)." "Returns (opts, args)."
parser = optparse.OptionParser() parser = optparse.OptionParser(version="%prog " + appVersion)
parser.usage = "%prog [OPTIONS] [file to import]" parser.usage = "%prog [OPTIONS] [file to import]"
parser.add_option("-b", "--base", help="path to base folder") parser.add_option("-b", "--base", help="path to base folder")
parser.add_option("-p", "--profile", help="profile name to load") parser.add_option("-p", "--profile", help="profile name to load")