mirror of
https://gitlab.com/fdroid/fdroidserver.git
synced 2024-11-19 21:30:10 +01:00
use ArgumentParser's own "usage" line in help output
This commit is contained in:
parent
b23cf9f8ad
commit
fede58a710
@ -148,7 +148,7 @@ For more info on this idea:
|
||||
def main():
|
||||
global options
|
||||
|
||||
parser = ArgumentParser(usage="%(prog)s [options]")
|
||||
parser = ArgumentParser()
|
||||
common.setup_global_opts(parser)
|
||||
parser.add_argument("--git-repo",
|
||||
default=os.path.join(os.getcwd(), 'binary_transparency'),
|
||||
|
@ -597,7 +597,7 @@ def main():
|
||||
global config, options
|
||||
|
||||
# Parse command line...
|
||||
parser = ArgumentParser(usage="%(prog)s [options] [APPID [APPID ...]]")
|
||||
parser = ArgumentParser()
|
||||
common.setup_global_opts(parser)
|
||||
parser.add_argument("appid", nargs='*', help=_("application ID of file to operate on"))
|
||||
parser.add_argument("--auto", action="store_true", default=False,
|
||||
|
@ -47,7 +47,7 @@ def main():
|
||||
global config, options
|
||||
|
||||
# Parse command line...
|
||||
parser = ArgumentParser(usage="%(prog)s [options]")
|
||||
parser = ArgumentParser()
|
||||
common.setup_global_opts(parser)
|
||||
options = parser.parse_args()
|
||||
|
||||
|
@ -568,7 +568,7 @@ def main():
|
||||
global config, options
|
||||
|
||||
# Parse command line...
|
||||
parser = ArgumentParser(usage="%(prog)s [options] [APPID [APPID ...]]")
|
||||
parser = ArgumentParser()
|
||||
common.setup_global_opts(parser)
|
||||
parser.add_argument("-f", "--format", action="store_true", default=False,
|
||||
help=_("Also warn about formatting issues, like rewritemeta -l"))
|
||||
|
@ -41,7 +41,7 @@ def _run_wget(path, urls):
|
||||
def main():
|
||||
global options
|
||||
|
||||
parser = ArgumentParser(usage=_("%(prog)s [options] url"))
|
||||
parser = ArgumentParser()
|
||||
common.setup_global_opts(parser)
|
||||
parser.add_argument("url", nargs='?',
|
||||
help=_('Base URL to mirror, can include the index signing key '
|
||||
|
@ -88,7 +88,7 @@ def _ssh_key_from_debug_keystore(keystore=KEYSTORE_FILE):
|
||||
|
||||
def main():
|
||||
|
||||
parser = ArgumentParser(usage="%(prog)s")
|
||||
parser = ArgumentParser()
|
||||
common.setup_global_opts(parser)
|
||||
parser.add_argument("--keystore", default=KEYSTORE_FILE,
|
||||
help=_("Specify which debug keystore file to use."))
|
||||
|
@ -25,7 +25,7 @@ options = None
|
||||
|
||||
def main():
|
||||
|
||||
parser = ArgumentParser(usage="%(prog)s")
|
||||
parser = ArgumentParser()
|
||||
common.setup_global_opts(parser)
|
||||
metadata.add_metadata_arguments(parser)
|
||||
options = parser.parse_args()
|
||||
|
@ -49,8 +49,7 @@ def main():
|
||||
|
||||
global config, options
|
||||
|
||||
# Parse command line...
|
||||
parser = ArgumentParser(usage="%(prog)s [options] [APPID [APPID ...]]")
|
||||
parser = ArgumentParser()
|
||||
common.setup_global_opts(parser)
|
||||
parser.add_argument("-l", "--list", action="store_true", default=False,
|
||||
help=_("List files that would be reformatted"))
|
||||
|
@ -87,9 +87,7 @@ def extract(options):
|
||||
|
||||
|
||||
def main():
|
||||
|
||||
# Parse command line...
|
||||
parser = ArgumentParser(usage="%(prog)s [options] APK [APK...]")
|
||||
parser = ArgumentParser()
|
||||
common.setup_global_opts(parser)
|
||||
parser.add_argument("APK", nargs='*',
|
||||
help=_("signed APK, either a file-path or HTTPS URL."))
|
||||
|
@ -91,8 +91,7 @@ def main():
|
||||
|
||||
global config, options
|
||||
|
||||
# Parse command line...
|
||||
parser = ArgumentParser(usage="%(prog)s [options]")
|
||||
parser = ArgumentParser()
|
||||
common.setup_global_opts(parser)
|
||||
options = parser.parse_args()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user