Commit 065ca211 authored by Dion Haefner's avatar Dion Haefner

adjusted usage strings

parent 33096c90
......@@ -8,7 +8,7 @@ import warnings
import subprocess
import multiprocessing
try:
try: # Python 2.x compatibility
input = raw_input
except NameError:
pass
......@@ -69,32 +69,45 @@ if __name__ == "__main__": # parse command line and call command handler
try:
with warnings.catch_warnings(record=True) as warn:
parser = argparse.ArgumentParser(description="DORiE command line interface",
epilog="For more information check our online documentation:\n"
"http://dorie-docs.bitballoon.com (password: 'richards')"
epilog="For more information check our online documentation: "
"http://dorie-docs.bitballoon.com (password: 'richards')."
)
subparsers = parser.add_subparsers(title="Commands",dest="command")
subparsers.required = True
parser_run = subparsers.add_parser('run',help="start dorie")
parser_run.add_argument('config',help="DORiE configuration file. Can be created with 'dorie create'.")
parser_run.add_argument('-p','--parallel', metavar='N', nargs='?', default=1, const=multiprocessing.cpu_count(), type=int, required=False,
help="Run in parallel on N processes. If N is not specified, run on all available CPU threads.")
parser_run.set_defaults(func=run)
parser_create = subparsers.add_parser('create', help="Copy example configuration to current folder.")
parser_create = subparsers.add_parser('create',
description="Copy example configuration to current folder.",
help="Copy example configuration to current folder.")
parser_create.add_argument('-f','--force', help="Override existing files.", action="store_true")
parser_create.set_defaults(func=create)
parser_pfg = subparsers.add_parser('pfg', help="Start parameter field generator.")
parser_pfg = subparsers.add_parser('pfg', help="Start parameter field generator.",
description="Start parameter field generator.",
usage="%(prog)s <config> [-h] [-p [N]]")
parser_pfg.add_argument('config',
help="Configuration file for the parameter field generator. Can be created with 'dorie create'.")
parser_pfg.add_argument('-p','--parallel', metavar='N', nargs='?', default=1, const=multiprocessing.cpu_count(), type=int, required=False,
help="Run in parallel on N processes. If N is not specified, run on all available CPU threads.")
help="Configuration file for the parameter field generator. "
"Can be created with 'dorie create'.")
parser_pfg.add_argument('-p','--parallel', metavar='N', nargs='?', default=1,
const=multiprocessing.cpu_count(), type=int, required=False,
help="Run in parallel on N processes. "
"If N is not specified, run on all available CPU threads.")
parser_pfg.set_defaults(func=pfg)
parser_plot = subparsers.add_parser('plot', help="Plot a preview of a VTK file created by DORiE.")
parser_run = subparsers.add_parser('run', help="Run DORiE.", description="Run DORiE.",
usage="%(prog)s <config> [-h] [-p [N]]")
parser_run.add_argument('config',help="DORiE configuration file. Can be created with 'dorie create'.")
parser_run.add_argument('-p','--parallel', metavar='N', nargs='?', default=1,
const=multiprocessing.cpu_count(), type=int, required=False,
help="Run in parallel on N processes. "
"If N is not specified, run on all available CPU threads.")
parser_run.set_defaults(func=run)
parser_plot = subparsers.add_parser('plot', help="Plot a preview of a VTK file created by DORiE.",
description="Plot a preview of a VTK file created by DORiE.",
usage="%(prog)s <vtk> [-h] [--v [VAR [VAR ...]]]")
parser_plot.add_argument('vtk', help="Input VTK file.")
parser_plot.add_argument('--var', nargs='*', required=False)
parser_plot.add_argument('-v','--var', nargs='*', required=False,
help="Plot only given variables. If not specified, all variables are plotted.")
parser_plot.set_defaults(func=plot)
args = parser.parse_args()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment