Added selecting a database
Signed-off-by: fly <merspieler@airmail.cc>
This commit is contained in:
parent
d163f44484
commit
3fd2c90929
1 changed files with 5 additions and 0 deletions
|
@ -26,6 +26,7 @@ from common import norm
|
|||
verbose = False
|
||||
dbuser = ""
|
||||
dbpw = ""
|
||||
dbname = "worldbuild"
|
||||
fname = ""
|
||||
repeat = 0
|
||||
|
||||
|
@ -47,6 +48,9 @@ while i < argc:
|
|||
elif sys.argv[i] == "-p" or sys.argv[i] == "--password":
|
||||
i += 1
|
||||
dbpw = sys.argv[i]
|
||||
elif sys.argv[i] == "-d" or sys.argv[i] == "--database":
|
||||
i += 1
|
||||
dbname = sys.argv[i]
|
||||
elif sys.argv[i] == "-r" or sys.argv[i] == "--repeat":
|
||||
i += 1
|
||||
repeat = int(sys.argv[i])
|
||||
|
@ -60,6 +64,7 @@ while i < argc:
|
|||
print(" -f, --file Output file")
|
||||
print(" -u, --user Database user")
|
||||
print(" -p, --password Database password")
|
||||
print(" -d, --database Database to be used. Default: worldbuild")
|
||||
print(" -v, --verbose Verbose printouts")
|
||||
print(" -r, --repeat If set, run every <n> minutes else run once")
|
||||
print(" -h, --help Shows this help and exit")
|
||||
|
|
Loading…
Add table
Reference in a new issue