Skip to content

Commit

Permalink
Merge pull request #42 from QuantEcon/adjust-help
Browse files Browse the repository at this point in the history
move view back to additional arguments for use when specifying directory
  • Loading branch information
mmcky committed Aug 2, 2019
2 parents 4f2032f + f8f9add commit 51a65ac
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions jupinx/cmd/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def get_parser() -> argparse.ArgumentParser:
)
parser = argparse.ArgumentParser(
usage='%(prog)s [OPTIONS] <DIRECTORY> [ADDITIONAL OPTIONS]',
formatter_class=argparse.RawDescriptionHelpFormatter,
formatter_class=argparse.RawTextHelpFormatter,
description=description,
epilog=epilog,
)
Expand Down Expand Up @@ -80,15 +80,6 @@ def get_parser() -> argparse.ArgumentParser:
[Result: _build/website/]
""".lstrip("\n"))
)
parser.add_argument('-v', '--view', dest='view', nargs='?', type=str, const='notebooks', action='store',
help=textwrap.dedent("""
Open a server to view results for
1. notebooks
2. website
[Default: --view will result in --view=notebooks]
Example: jupinx -w lecture-source --view=website
""".lstrip("\n"))
)
parser.add_argument('--version', action='version', dest='show_version',
version='%%(prog)s %s' % __display_version__)
group = parser.add_argument_group(__('additional options'))
Expand All @@ -98,6 +89,15 @@ def get_parser() -> argparse.ArgumentParser:
[Default: --parallel will result in --parallel=2 if no value is specified]
""".lstrip("\n"))
)
group.add_argument('-v', '--view', dest='view', nargs='?', type=str, choices=['notebooks','website'], const='notebooks', action='store',
help=textwrap.dedent("""
Open a server to view results for
1. notebooks
2. website
[Default: --view will result in --view=notebooks]
Example: jupinx -w lecture-source --view=website
""".lstrip("\n"))
)
return parser

def check_directory_makefile(arg_dict):
Expand Down

0 comments on commit 51a65ac

Please sign in to comment.