renamed --config-file to --settings, updated README with new options
This commit is contained in:
23
README.rst
23
README.rst
@@ -191,11 +191,18 @@ Options
|
||||
--list-rendermodes
|
||||
List the available render modes, and a short description of each.
|
||||
|
||||
--settings=PATH
|
||||
Use this option to load settings from a file. The format of this file is
|
||||
given below.
|
||||
|
||||
|
||||
Settings
|
||||
--------
|
||||
You can optionally store settings in a file named settings.py. It is a regular
|
||||
python script, so you can use any python functions or modules you want.
|
||||
|
||||
You can optionally store settings in a file named settings.py (or really,
|
||||
anything you want). It is a regular python script, so you can use any python
|
||||
functions or modules you want. To use a settings file, use the --settings
|
||||
command line option.
|
||||
|
||||
For a sample settings file, look at 'sample.settings.py'. Note that this file
|
||||
is not meant to be used directly, but instead it should be used as a
|
||||
@@ -241,6 +248,18 @@ web_assets_hook
|
||||
|
||||
This function should accept one argument: a QuadtreeGen object.
|
||||
|
||||
web_assets_path
|
||||
This option lets you provide alternative web assets to use when
|
||||
rendering. The contents of this folder will be copied into the output folder
|
||||
during render, and will overwrite any default files already copied by
|
||||
Overviewer. See the web_assets folder included with Overviewer for the
|
||||
default assets.
|
||||
|
||||
textures_path
|
||||
This is like web_assets_path, but instead it provides an alternative texture
|
||||
source. Overviewer looks in here for terrain.png and other textures before
|
||||
it looks anywhere else.
|
||||
|
||||
Viewing the Results
|
||||
-------------------
|
||||
Within the output directory you will find two things: an index.html file, and a
|
||||
|
||||
@@ -24,7 +24,7 @@ class ConfigOptionParser(object):
|
||||
self.requiredArgs = []
|
||||
|
||||
# add the *very* special config-file path option
|
||||
self.add_option("--config-file", dest="config_file", help="Specifies a configuration file to load, by name. This file's format is discussed in the README.", metavar="PATH", type="string", commandLineOnly=True)
|
||||
self.add_option("--settings", dest="config_file", help="Specifies a settings file to load, by name. This file's format is discussed in the README.", metavar="PATH", type="string", commandLineOnly=True)
|
||||
|
||||
def display_config(self):
|
||||
logging.info("Using the following settings:")
|
||||
@@ -77,7 +77,7 @@ class ConfigOptionParser(object):
|
||||
self.configFile = options.config_file
|
||||
elif os.path.exists(self.configFile):
|
||||
# warn about automatic loading
|
||||
logging.warning("Automatic settings.py loading is DEPRECATED, and may be removed in the future. Please use --config-file instead.")
|
||||
logging.warning("Automatic settings.py loading is DEPRECATED, and may be removed in the future. Please use --settings instead.")
|
||||
|
||||
if os.path.exists(self.configFile):
|
||||
execfile(self.configFile, g, l)
|
||||
|
||||
Reference in New Issue
Block a user