From 21de6222ca80a251e4fc92514e7278e7442b8e84 Mon Sep 17 00:00:00 2001 From: Aaron Griffith Date: Fri, 13 May 2011 18:22:00 -0400 Subject: [PATCH] renamed --config-file to --settings, updated README with new options --- README.rst | 23 +++++++++++++++++++++-- configParser.py | 4 ++-- 2 files changed, 23 insertions(+), 4 deletions(-) diff --git a/README.rst b/README.rst index 1d0e9ab..11f9f10 100644 --- a/README.rst +++ b/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 diff --git a/configParser.py b/configParser.py index c779fc2..01e6a14 100644 --- a/configParser.py +++ b/configParser.py @@ -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)