Skip to content

Commit

Permalink
Merge branch 'release-0.0.7'
Browse files Browse the repository at this point in the history
  • Loading branch information
sinoroc committed Apr 21, 2020
2 parents 70ae96f + 3a8e26a commit 1a95eb2
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 6 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@

.. Keep the current version number on line number 5
0.0.7
=====

2020-04-21

* Replace CLI optional '--tools' with positional


0.0.6
=====

Expand Down
25 changes: 25 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,31 @@ Source code:
Usage
=====


.. code::
$ toolmaker --help
usage: toolmaker [-h] [--version] [--config CONFIG]
[--build | --rebuild | --delete] [--all]
[tool [tool ...]]
Make single-file builds of Python tools using zapp, shiv, or pex
positional arguments:
tool apply action on this tool(s)
optional arguments:
-h, --help show this help message and exit
--version show program's version number and exit
--config CONFIG, -c CONFIG
configuration file (default:
/home/sinoroc/.config/toolmaker/toolmaker.cfg)
--build, -b build selected tool(s)
--rebuild, -r rebuild selected tool(s)
--delete, -d delete selected tool(s)
--all, -a apply action on all tools
Configuration
-------------

Expand Down
11 changes: 5 additions & 6 deletions src/toolmaker/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,18 +46,17 @@ def _create_args_parser(default_config_path, tools_names=None):
action='store_true',
help=_("delete selected tool(s)"),
)
tools_group = args_parser.add_mutually_exclusive_group(required=True)
tools_group.add_argument(
args_parser.add_argument(
'--all', '-a',
action='store_true',
help=_("apply action on all tools"),
)
tools_group.add_argument(
'--tools', '-t',
args_parser.add_argument(
'tools',
choices=tools_names,
help=_("apply action on this list of tools"),
help=_("apply action on this tool(s)"),
metavar='tool',
nargs='+',
nargs='*',
)
return args_parser

Expand Down

0 comments on commit 1a95eb2

Please sign in to comment.