Clean up launcher help strings
This commit is contained in:
parent
fabcc87ecd
commit
815ef198f5
1 changed files with 15 additions and 12 deletions
|
|
@ -1,12 +1,13 @@
|
||||||
#!/usr/bin/env python
|
#!/usr/bin/python
|
||||||
"""
|
"""
|
||||||
EVENNIA SERVER LAUNCHER SCRIPT
|
Evennia launcher program
|
||||||
|
|
||||||
This is the start point for running Evennia.
|
This is the start point for running Evennia.
|
||||||
|
|
||||||
Sets the appropriate environmental variables and launches the server
|
Sets the appropriate environmental variables for managing an Evennia game. It will start and connect
|
||||||
and portal through the evennia_runner. Run without arguments to get a
|
to the Portal, through which the Server is also controlled. This pprogram
|
||||||
menu. Run the script with the -h flag to see usage information.
|
|
||||||
|
Run the script with the -h flag to see usage information.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
from __future__ import print_function
|
from __future__ import print_function
|
||||||
|
|
@ -19,6 +20,7 @@ import shutil
|
||||||
import importlib
|
import importlib
|
||||||
from distutils.version import LooseVersion
|
from distutils.version import LooseVersion
|
||||||
from argparse import ArgumentParser
|
from argparse import ArgumentParser
|
||||||
|
import argparse
|
||||||
from subprocess import Popen, check_output, call, CalledProcessError, STDOUT
|
from subprocess import Popen, check_output, call, CalledProcessError, STDOUT
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
|
@ -1201,7 +1203,7 @@ def del_pid(pidfile):
|
||||||
os.remove(pidfile)
|
os.remove(pidfile)
|
||||||
|
|
||||||
|
|
||||||
def kill(pidfile, killsignal=SIG, succmsg="", errmsg="", restart=False):
|
def kill(pidfile, killsignal=SIG, succmsg="", errmsg=""):
|
||||||
"""
|
"""
|
||||||
Send a kill signal to a process based on PID. A customized
|
Send a kill signal to a process based on PID. A customized
|
||||||
success/error message will be returned. If clean=True, the system
|
success/error message will be returned. If clean=True, the system
|
||||||
|
|
@ -1562,7 +1564,7 @@ def main():
|
||||||
help="Creates a new gamedir 'name' at current location.")
|
help="Creates a new gamedir 'name' at current location.")
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
'--list', nargs='+', action='store', dest='listsetting', metavar="all|<key>",
|
'--list', nargs='+', action='store', dest='listsetting', metavar="all|<key>",
|
||||||
help=("List values for server settings. Use 'all' to list all "
|
help=("List values for one or more server settings. Use 'all' to list all "
|
||||||
"available keys."))
|
"available keys."))
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
'--settings', nargs=1, action='store', dest='altsettings',
|
'--settings', nargs=1, action='store', dest='altsettings',
|
||||||
|
|
@ -1584,17 +1586,18 @@ def main():
|
||||||
'-v', '--version', action='store_true',
|
'-v', '--version', action='store_true',
|
||||||
dest='show_version', default=False,
|
dest='show_version', default=False,
|
||||||
help="Show version info.")
|
help="Show version info.")
|
||||||
|
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
"operation", nargs='?', default="noop",
|
"operation", nargs='?', default="noop",
|
||||||
metavar="start|stop|reload|reset|sstart|info|status|menu",
|
help=("One of start, stop, reload, reset, sstart, info, status and menu. "
|
||||||
help="Operation to perform. Unregognized actions are passed on to Django.")
|
"Unregognized input is passed on to Django."))
|
||||||
parser.epilog = (
|
parser.epilog = (
|
||||||
"Common usage: evennia start|stop|reload. Django-admin database commands:"
|
"Common Django-admin commands are shell, dbshell, migrate and flush. "
|
||||||
"evennia migration|flush|shell|dbshell (see the django documentation for more "
|
"See the django documentation for more django-admin commands.")
|
||||||
"django-admin commands.)")
|
|
||||||
|
|
||||||
args, unknown_args = parser.parse_known_args()
|
args, unknown_args = parser.parse_known_args()
|
||||||
|
|
||||||
|
print(args.rest)
|
||||||
# handle arguments
|
# handle arguments
|
||||||
option = args.operation
|
option = args.operation
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue