From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id B966D1388C1 for ; Sun, 21 Feb 2016 22:15:00 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 07FE721C0F2; Sun, 21 Feb 2016 22:15:00 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 8BD9721C0F2 for ; Sun, 21 Feb 2016 22:14:59 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 6E92E340AF3 for ; Sun, 21 Feb 2016 22:14:58 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 9D84B18A4 for ; Sun, 21 Feb 2016 22:14:55 +0000 (UTC) From: "Sebastian Pipping" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sebastian Pipping" Message-ID: <1456091587.8f51fde869db377563e9554db7bed6288b42a9cc.sping@gentoo> Subject: [gentoo-commits] proj/metagen:master commit in: metagen/ X-VCS-Repository: proj/metagen X-VCS-Files: metagen/main.py X-VCS-Directories: metagen/ X-VCS-Committer: sping X-VCS-Committer-Name: Sebastian Pipping X-VCS-Revision: 8f51fde869db377563e9554db7bed6288b42a9cc X-VCS-Branch: master Date: Sun, 21 Feb 2016 22:14:55 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 744efebd-8721-4b2c-be13-0ebfc837e125 X-Archives-Hash: 986f419307baea4c5907b5b09285c0bd commit: 8f51fde869db377563e9554db7bed6288b42a9cc Author: Sebastian Pipping pipping org> AuthorDate: Sun Feb 21 19:52:17 2016 +0000 Commit: Sebastian Pipping gentoo org> CommitDate: Sun Feb 21 21:53:07 2016 +0000 URL: https://gitweb.gentoo.org/proj/metagen.git/commit/?id=8f51fde8 Group command line arguments metagen/main.py | 33 ++++++++++++++------------------- 1 file changed, 14 insertions(+), 19 deletions(-) diff --git a/metagen/main.py b/metagen/main.py index d243c24..1648f92 100755 --- a/metagen/main.py +++ b/metagen/main.py @@ -113,41 +113,36 @@ if __name__ == '__main__': parser = ArgumentParser(prog='metagen') parser.add_argument('--version', action='version', version='%(prog)s ' + __version__) - parser.add_argument("-H", action="store", dest="herd", + maintainer = parser.add_argument_group(title='maintainer arguments') + maintainer.add_argument("-H", action="store", dest="herd", help="Name of herd. If not specified, It will be empty. " + "This requires either the -e or -m option.") - - parser.add_argument("-e", action="store", dest="email", + maintainer.add_argument("-e", action="store", dest="email", help="Maintainer's email address") - - parser.add_argument("-n", action="store", dest="name", + maintainer.add_argument("-n", action="store", dest="name", help="Maintainer's name") - - parser.add_argument("-m", action="store_true", dest="echangelog", + maintainer.add_argument("-m", action="store_true", dest="echangelog", default=False, help="Use name and email address from ECHANGELOG_USER "+ "environmental variable. "+ "This is a shortcut for -e -n ") - - parser.add_argument("-d", action="store", dest="desc", + maintainer.add_argument("-d", action="store", dest="desc", help="Description of maintainership") - parser.add_argument("-l", action="store", dest="long", + package = parser.add_argument_group(title='package arguments') + package.add_argument("-l", action="store", dest="long", help="Long description of package.") - parser.add_argument("-o", action="store", dest="output", + operation = parser.add_argument_group(title='operation arguments') + operation.add_argument("-o", action="store", dest="output", help="Specify location of output file.") - - parser.add_argument("-f", action="store_true", dest="force", default=False, + operation.add_argument("-f", action="store_true", dest="force", default=False, help="Force overwrite of existing metadata.") - - parser.add_argument("-v", action="store_true", dest="verbose", default=True, + operation.add_argument("-v", action="store_true", dest="verbose", default=True, help="Verbose. Output of file to stdout. (default)") - - parser.add_argument("-q", action="store_false", dest="verbose", + operation.add_argument("-q", action="store_false", dest="verbose", help="Squelch output of file to stdout.") - - parser.add_argument("-Q", action="store_true", dest="no_write", + operation.add_argument("-Q", action="store_true", dest="no_write", default=False, help="Do not write file to disk.")