0

Add --update-web-assets option

This commit is contained in:
Thomas Lake
2012-08-12 16:37:35 +01:00
parent b7ed14b4a6
commit 83caa5f456
2 changed files with 25 additions and 13 deletions

View File

@@ -83,6 +83,8 @@ def main():
help="Prints the location and hash of terrain.png, useful for debugging terrain.png problems")
parser.add_option("-V", "--version", dest="version",
help="Displays version information and then exits", action="store_true")
parser.add_option("--update-web-assets", dest='update_web_assets', action="store_true",
help="Update web assets. Will *not* render tiles or update overviewerConfig.js")
# Log level options:
parser.add_option("-q", "--quiet", dest="quiet", action="count", default=0,
@@ -334,6 +336,18 @@ dir but you forgot to put quotes around the directory, since it contains spaces.
logging.exception("Could not create the output directory.")
return 1
########################################################################
# Now we start the actual processing, now that all the configuration has
# been gathered and validated
# create our asset manager... ASSMAN
assetMrg = assetmanager.AssetManager(destdir, config.get('customwebassets', None))
# If we've been asked to update web assets, do that and then exit
if options.update_web_assets:
assetMrg.output_noconfig()
logging.info("Web assets have been updated")
return 0
# The changelist support.
changelists = {}
for render in config['renders'].itervalues():
@@ -347,13 +361,6 @@ dir but you forgot to put quotes around the directory, since it contains spaces.
out = changelists[path]
render['changelist'] = out.fileno()
########################################################################
# Now we start the actual processing, now that all the configuration has
# been gathered and validated
# create our asset manager... ASSMAN
assetMrg = assetmanager.AssetManager(destdir, config.get('customwebassets', None))
tilesets = []
# saves us from creating the same World object over and over again