From 758797122907f32b6bf5ba393e693c8d6dfe90cc Mon Sep 17 00:00:00 2001 From: Dan Lenski Date: Sat, 26 Dec 2015 22:53:04 -0800 Subject: [PATCH] group options --- wp2git.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/wp2git.py b/wp2git.py index 74d62ec..9cf97e4 100755 --- a/wp2git.py +++ b/wp2git.py @@ -19,14 +19,16 @@ def sanitize(s): def parse_args(): p = argparse.ArgumentParser(description='Create a git repository with the history of the specified Wikipedia article.') p.add_argument('article_name') - g=p.add_mutually_exclusive_group() + g2 = p.add_argument_group('Output options') + g=g2.add_mutually_exclusive_group() g.add_argument('-n', '--no-import', dest='doimport', default=True, action='store_false', help="Don't invoke git fast-import; only generate fast-import data stream") g.add_argument('-b', '--bare', action='store_true', help="Import to a bare repository (no working tree)") - p.add_argument('-o', '--out', help='Output directory or fast-import stream file') - g=p.add_mutually_exclusive_group() + g2.add_argument('-o', '--out', help='Output directory or fast-import stream file') + g2 = p.add_argument_group('MediaWiki site selection') + g=g2.add_mutually_exclusive_group() g.add_argument('--lang', default=lang, help='Wikipedia language code (default %(default)s)') - g.add_argument('--site', help='Alternate site (e.g. http://commons.wikimedia.org[/w/])') + g.add_argument('--site', help='Alternate MediaWiki site (e.g. http://commons.wikimedia.org[/w/])') args = p.parse_args() if not args.doimport: