0

Added docstrings to all contrib scripts

This commit is contained in:
Andrew Chin
2011-08-25 21:57:08 -04:00
parent 48bc9da527
commit 22f40a9075
8 changed files with 32 additions and 6 deletions

View File

@@ -1,3 +1,13 @@
"""Simple Benchmarking script.
Usage and example:
$ python contrib/benchmark.py World4/
Rendering 50 chunks...
Took 20.290062 seconds or 0.405801 seconds per chunk, or 2.464261 chunks per second
"""
import chunk
import world
import tempfile
@@ -8,12 +18,6 @@ import os
import sys
import shutil
# Simple Benchmarking script. Usage and example:
# $ python contrib/benchmark.py World4/
# Rendering 50 chunks...
# Took 20.290062 seconds or 0.405801 seconds per chunk, or 2.464261 chunks per second
# create a new, empty, cache dir
cachedir = tempfile.mkdtemp(prefix="benchmark_cache", dir=".")

View File

@@ -1,3 +1,7 @@
"""Produces block counts
"""
import world, chunk
import sys

View File

@@ -1,5 +1,8 @@
#!/usr/bin/python
"""Deletes files from the old chunk-based cache"""
usage = "python contrib/%prog [OPTIONS] <World # / Name / Path to World>"
description = """

View File

@@ -1,6 +1,8 @@
#!/usr/bin/python
'''
Updates overviewer.dat file sign info
This script will scan through every chunk looking for signs and write out an
updated overviewer.dat file. This can be useful if your overviewer.dat file
is either out-of-date or non-existant.

View File

@@ -1,5 +1,9 @@
import sys
"""
Very basic player.dat inspection script
"""
sys.path.append(".")
from overviewer_core.nbt import load

View File

@@ -1,6 +1,8 @@
#!/usr/bin/python
'''
Generate a region list to rerender certain chunks
This is used to force the regeneration of any chunks that contain a certain
blockID. The output is a chunklist file that is suitable to use with the
--chunklist option to overviewer.py.

View File

@@ -1,5 +1,7 @@
#!/usr/bin/python
"Test Render Script"
import os, shutil, tempfile, time, sys, math, re
from subprocess import Popen, PIPE, STDOUT, CalledProcessError
from optparse import OptionParser

View File

@@ -1,5 +1,10 @@
#!/usr/bin/env python
'''
Validate a region file
TODO description here'''
import os.path
import sys
overviewer_dir = os.path.split(os.path.split(os.path.abspath(__file__))[0])[0]