From: david-sarah Date: Tue, 3 Aug 2010 08:48:01 +0000 (-0700) Subject: CLI: make all of the option descriptions imperative sentences. X-Git-Tag: allmydata-tahoe-1.8.0b2~36 X-Git-Url: https://git.rkrishnan.org/%5B/%5D%20/file/URI:LIT:krugkidfnzsc4/index.php?a=commitdiff_plain;h=a32f625db9d495896f038f44a6ab16aaa8dfc776;p=tahoe-lafs%2Ftahoe-lafs.git CLI: make all of the option descriptions imperative sentences. --- diff --git a/src/allmydata/scripts/cli.py b/src/allmydata/scripts/cli.py index 62994de4..55471669 100644 --- a/src/allmydata/scripts/cli.py +++ b/src/allmydata/scripts/cli.py @@ -17,10 +17,10 @@ class VDriveOptions(BaseOptions): "to root dirnode URI." + ( _default_nodedir and (" [default for most commands: " + quote_output(_default_nodedir) + "]") or "")], ["node-url", "u", None, - "URL of the tahoe node to use, a URL like \"http://127.0.0.1:3456\". " + "Specify the URL of the Tahoe gateway node, such as 'http://127.0.0.1:3456'. " "This overrides the URL found in the --node-directory ."], ["dir-cap", None, None, - "Which dirnode URI should be used as the 'tahoe' alias."] + "Specify which dirnode URI should be used as the 'tahoe' alias."] ] def postOptions(self): @@ -78,11 +78,11 @@ class ListAliasOptions(VDriveOptions): class ListOptions(VDriveOptions): optFlags = [ - ("long", "l", "Use long format: show file sizes, and timestamps"), - ("uri", "u", "Show file/directory URIs"), - ("readonly-uri", None, "Show readonly file/directory URIs"), - ("classify", "F", "Append '/' to directory names, and '*' to mutable"), - ("json", None, "Show the raw JSON output"), + ("long", "l", "Use long format: show file sizes, and timestamps."), + ("uri", "u", "Show file/directory URIs."), + ("readonly-uri", None, "Show read-only file/directory URIs."), + ("classify", "F", "Append '/' to directory names, and '*' to mutable."), + ("json", None, "Show the raw JSON output."), ] def parseArgs(self, where=""): self.where = argv_to_unicode(where) @@ -355,10 +355,10 @@ class WebopenOptions(VDriveOptions): class ManifestOptions(VDriveOptions): optFlags = [ - ("storage-index", "s", "Only print storage index strings, not pathname+cap"), - ("verify-cap", None, "Only print verifycap, not pathname+cap"), - ("repair-cap", None, "Only print repaircap, not pathname+cap"), - ("raw", "r", "Display raw JSON data instead of parsed"), + ("storage-index", "s", "Only print storage index strings, not pathname+cap."), + ("verify-cap", None, "Only print verifycap, not pathname+cap."), + ("repair-cap", None, "Only print repaircap, not pathname+cap."), + ("raw", "r", "Display raw JSON data instead of parsed."), ] def parseArgs(self, where=''): self.where = argv_to_unicode(where) @@ -384,10 +384,10 @@ class StatsOptions(VDriveOptions): class CheckOptions(VDriveOptions): optFlags = [ - ("raw", None, "Display raw JSON data instead of parsed"), - ("verify", None, "Verify all hashes, instead of merely querying share presence"), - ("repair", None, "Automatically repair any problems found"), - ("add-lease", None, "Add/renew lease on all shares"), + ("raw", None, "Display raw JSON data instead of parsed."), + ("verify", None, "Verify all hashes, instead of merely querying share presence."), + ("repair", None, "Automatically repair any problems found."), + ("add-lease", None, "Add/renew lease on all shares."), ] def parseArgs(self, where=''): self.where = argv_to_unicode(where) @@ -402,10 +402,10 @@ class CheckOptions(VDriveOptions): class DeepCheckOptions(VDriveOptions): optFlags = [ - ("raw", None, "Display raw JSON data instead of parsed"), - ("verify", None, "Verify all hashes, instead of merely querying share presence"), - ("repair", None, "Automatically repair any problems found"), - ("add-lease", None, "Add/renew lease on all shares"), + ("raw", None, "Display raw JSON data instead of parsed."), + ("verify", None, "Verify all hashes, instead of merely querying share presence."), + ("repair", None, "Automatically repair any problems found."), + ("add-lease", None, "Add/renew lease on all shares."), ("verbose", "v", "Be noisy about what is happening."), ] def parseArgs(self, where=''): diff --git a/src/allmydata/scripts/common.py b/src/allmydata/scripts/common.py index e3af37db..96879b68 100644 --- a/src/allmydata/scripts/common.py +++ b/src/allmydata/scripts/common.py @@ -59,7 +59,7 @@ class BasedirMixin: ["basedir", "C", None, "Same as --node-directory."], ] optFlags = [ - ["multiple", "m", "Specify multiple node directories at once"], + ["multiple", "m", "Specify multiple node directories at once."], ] def parseArgs(self, *args): diff --git a/src/allmydata/scripts/create_node.py b/src/allmydata/scripts/create_node.py index de356c5d..5a7f2527 100644 --- a/src/allmydata/scripts/create_node.py +++ b/src/allmydata/scripts/create_node.py @@ -11,15 +11,15 @@ class CreateClientOptions(BasedirMixin, BaseOptions): # we provide 'create-node'-time options for the most common # configuration knobs. The rest can be controlled by editing # tahoe.cfg before node startup. - ("nickname", "n", None, "nickname for this node"), - ("introducer", "i", None, "introducer FURL to use"), + ("nickname", "n", None, "Specify the nickname for this node."), + ("introducer", "i", None, "Specify the introducer FURL to use."), ("webport", "p", "tcp:3456:interface=127.0.0.1", - "which TCP port to run the HTTP interface on. Use 'none' to disable."), + "Specify which TCP port to run the HTTP interface on. Use 'none' to disable."), ] class CreateNodeOptions(CreateClientOptions): optFlags = [ - ("no-storage", None, "do not offer storage service to other nodes"), + ("no-storage", None, "Do not offer storage service to other nodes."), ] class CreateIntroducerOptions(BasedirMixin, BaseOptions): diff --git a/src/allmydata/scripts/debug.py b/src/allmydata/scripts/debug.py index 7bb225f8..793ee1c3 100644 --- a/src/allmydata/scripts/debug.py +++ b/src/allmydata/scripts/debug.py @@ -11,8 +11,8 @@ class DumpOptions(usage.Options): return "Usage: tahoe debug dump-share SHARE_FILENAME" optFlags = [ - ["offsets", None, "Display a table of section offsets"], - ["leases-only", None, "Dump leases but not CHK contents"], + ["offsets", None, "Display a table of section offsets."], + ["leases-only", None, "Dump leases but not CHK contents."], ] def getUsage(self, width=None): @@ -306,11 +306,11 @@ class DumpCapOptions(usage.Options): return "Usage: tahoe debug dump-cap [options] FILECAP" optParameters = [ ["nodeid", "n", - None, "storage server nodeid (ascii), to construct WE and secrets."], + None, "Specify the storage server nodeid (ASCII), to construct WE and secrets."], ["client-secret", "c", None, - "client's base secret (ascii), to construct secrets"], + "Specify the client's base secret (ASCII), to construct secrets."], ["client-dir", "d", None, - "client's base directory, from which a -c secret will be read"], + "Specify the client's base directory, from which a -c secret will be read."], ] def parseArgs(self, cap): self.cap = cap @@ -694,7 +694,7 @@ class CorruptShareOptions(usage.Options): return "Usage: tahoe debug corrupt-share SHARE_FILENAME" optParameters = [ - ["offset", "o", "block-random", "Which bit to flip."], + ["offset", "o", "block-random", "Specify which bit to flip."], ] def getUsage(self, width=None): @@ -781,11 +781,11 @@ class DebugCommand(usage.Options): subCommands = [ ["dump-share", None, DumpOptions, "Unpack and display the contents of a share (uri_extension and leases)."], - ["dump-cap", None, DumpCapOptions, "Unpack a read-cap or write-cap"], - ["find-shares", None, FindSharesOptions, "Locate sharefiles in node dirs"], - ["catalog-shares", None, CatalogSharesOptions, "Describe shares in node dirs"], - ["corrupt-share", None, CorruptShareOptions, "Corrupt a share"], - ["repl", None, ReplOptions, "Open a python interpreter"], + ["dump-cap", None, DumpCapOptions, "Unpack a read-cap or write-cap."], + ["find-shares", None, FindSharesOptions, "Locate sharefiles in node dirs."], + ["catalog-shares", None, CatalogSharesOptions, "Describe all shares in node dirs."], + ["corrupt-share", None, CorruptShareOptions, "Corrupt a share by flipping a bit."], + ["repl", None, ReplOptions, "Open a Python interpreter."], ] def postOptions(self): if not hasattr(self, 'subOptions'): @@ -796,10 +796,10 @@ class DebugCommand(usage.Options): #t = usage.Options.getUsage(self, width) t = """ Subcommands: - tahoe debug dump-share Unpack and display the contents of a share - tahoe debug dump-cap Unpack a read-cap or write-cap - tahoe debug find-shares Locate sharefiles in node directories - tahoe debug catalog-shares Describe all shares in node dirs + tahoe debug dump-share Unpack and display the contents of a share. + tahoe debug dump-cap Unpack a read-cap or write-cap. + tahoe debug find-shares Locate sharefiles in node directories. + tahoe debug catalog-shares Describe all shares in node dirs. tahoe debug corrupt-share Corrupt a share by flipping a bit. Please run e.g. 'tahoe debug dump-share --help' for more details on each @@ -826,7 +826,7 @@ def do_debug(options): subCommands = [ - ["debug", None, DebugCommand, "debug subcommands: use 'tahoe debug' for a list"], + ["debug", None, DebugCommand, "debug subcommands: use 'tahoe debug' for a list."], ] dispatch = { diff --git a/src/allmydata/scripts/startstop_node.py b/src/allmydata/scripts/startstop_node.py index df7a6821..551b92fd 100644 --- a/src/allmydata/scripts/startstop_node.py +++ b/src/allmydata/scripts/startstop_node.py @@ -8,8 +8,8 @@ class StartOptions(BasedirMixin, BaseOptions): ["basedir", "C", None, "which directory to start the node in"], ] optFlags = [ - ["profile", "p", "whether to run under the Python profiler, putting results in \"profiling_results.prof\""], - ["syslog", None, "tell the node to log to syslog, not a file"], + ["profile", "p", "Run under the Python profiler, putting results in 'profiling_results.prof'."], + ["syslog", None, "Tell the node to log to syslog, not a file."], ] class StopOptions(BasedirMixin, BaseOptions): @@ -22,8 +22,8 @@ class RestartOptions(BasedirMixin, BaseOptions): ["basedir", "C", None, "which directory to restart the node in"], ] optFlags = [ - ["profile", "p", "whether to run under the Python profiler, putting results in \"profiling_results.prof\""], - ["syslog", None, "tell the node to log to syslog, not a file"], + ["profile", "p", "Run under the Python profiler, putting results in 'profiling_results.prof'."], + ["syslog", None, "Tell the node to log to syslog, not a file."], ] class RunOptions(BasedirMixin, BaseOptions):