Updated and adjusted options help text in main.py and README.

This commit is contained in:
Emanuel Schuetze 2013-06-17 17:41:59 +02:00
parent 7dc2b0d904
commit 42809048f9
2 changed files with 30 additions and 19 deletions

View File

@ -57,29 +57,36 @@ Command line options
The following command line options are available: The following command line options are available:
-h, --help -h, --help
Shows all options Show this help message and exit.
-a, --address=ADDRESS -a, --address=ADDRESS
Changes the address on which the server will listen for connections IP Address to listen on. Default: 0.0.0.0
-p PORT, --port=PORT -p PORT, --port=PORT
Changes the port on which the server will listen for connections Port to listen on. Default: 8000 (start as admin/root: 80)
--syncdb --syncdb
Creates/updates database before starting the server Update/create database before starting the server.
--backupdb=BACKUP_PATH
Make a backup copy of the database to BACKUP_PATH.
--reset-admin --reset-admin
Resets the password to 'admin' for user 'admin' Make sure the user 'admin' exists and uses 'admin' as
password.
-s SETTINGS, --settings=SETTINGS -s SETTINGS, --settings=SETTINGS
Sets the path to the settings file. Set the path to the settings file.
--no-reload
Does not reload the development server
--no-browser --no-browser
Do not automatically start web browser. Do not automatically start web browser.
--no-reload
Do not reload the web server.
--no-run
Do not start the web server.
--version --version
Show version and exit. Show version and exit.
@ -100,6 +107,6 @@ Operating Systems (OpenSlides runs anywhere where Pyhton is running):
Browsers: Browsers:
Firefox 3.6+ Firefox 3.6+
IE 7+ IE 8+
Chrome Chrome
Safari Safari

View File

@ -84,29 +84,33 @@ def process_options(argv=None, manage_runserver=False):
parser = optparse.OptionParser( parser = optparse.OptionParser(
description="Run openslides using the tornado webserver") description="Run openslides using the tornado webserver")
parser.add_option("-a", "--address", help="IP Address to listen on.") parser.add_option(
parser.add_option("-p", "--port", type="int", help="Port to listen on.") "-a", "--address",
help="IP Address to listen on. Default: 0.0.0.0")
parser.add_option(
"-p", "--port", type="int",
help="Port to listen on. Default: 8000 (start as admin/root: 80)")
parser.add_option( parser.add_option(
"--syncdb", action="store_true", "--syncdb", action="store_true",
help="Update/create database before starting the server.") help="Update/create database before starting the server.")
parser.add_option( parser.add_option(
"--backupdb", action="store", metavar="BACKUP_PATH", "--backupdb", action="store", metavar="BACKUP_PATH",
help="Make a backup copy of the database to BACKUP_PATH") help="Make a backup copy of the database to BACKUP_PATH.")
parser.add_option( parser.add_option(
"--reset-admin", action="store_true", "--reset-admin", action="store_true",
help="Make sure the user 'admin' exists and uses 'admin' as password.") help="Make sure the user 'admin' exists and uses 'admin' as password.")
parser.add_option( parser.add_option(
"-s", "--settings", help="Path to the openslides configuration.") "-s", "--settings", help="Set the path to the settings file.")
parser.add_option(
"--no-reload", action="store_true",
help="Do not reload the development server.")
parser.add_option( parser.add_option(
"--no-browser", "--no-browser",
action="store_false", dest="start_browser", default=True, action="store_false", dest="start_browser", default=True,
help="Do not automatically start web browser.") help="Do not automatically start the web browser.")
parser.add_option(
"--no-reload", action="store_true",
help="Do not reload the web server.")
parser.add_option( parser.add_option(
"--no-run", action="store_true", "--no-run", action="store_true",
help="Do not start the development server.") help="Do not start the web server.")
parser.add_option( parser.add_option(
"--version", action="store_true", "--version", action="store_true",
help="Show version and exit.") help="Show version and exit.")