Skip to content

Commit 1a95eb2

Browse files
committed
Merge branch 'release-0.0.7'
2 parents 70ae96f + 3a8e26a commit 1a95eb2

3 files changed

Lines changed: 38 additions & 6 deletions

File tree

CHANGELOG.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,14 @@
22
33

44
.. Keep the current version number on line number 5
5+
0.0.7
6+
=====
7+
8+
2020-04-21
9+
10+
* Replace CLI optional '--tools' with positional
11+
12+
513
0.0.6
614
=====
715

README.rst

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,31 @@ Source code:
2323
Usage
2424
=====
2525

26+
27+
.. code::
28+
29+
$ toolmaker --help
30+
usage: toolmaker [-h] [--version] [--config CONFIG]
31+
[--build | --rebuild | --delete] [--all]
32+
[tool [tool ...]]
33+
34+
Make single-file builds of Python tools using zapp, shiv, or pex
35+
36+
positional arguments:
37+
tool apply action on this tool(s)
38+
39+
optional arguments:
40+
-h, --help show this help message and exit
41+
--version show program's version number and exit
42+
--config CONFIG, -c CONFIG
43+
configuration file (default:
44+
/home/sinoroc/.config/toolmaker/toolmaker.cfg)
45+
--build, -b build selected tool(s)
46+
--rebuild, -r rebuild selected tool(s)
47+
--delete, -d delete selected tool(s)
48+
--all, -a apply action on all tools
49+
50+
2651
Configuration
2752
-------------
2853

src/toolmaker/cli.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,18 +46,17 @@ def _create_args_parser(default_config_path, tools_names=None):
4646
action='store_true',
4747
help=_("delete selected tool(s)"),
4848
)
49-
tools_group = args_parser.add_mutually_exclusive_group(required=True)
50-
tools_group.add_argument(
49+
args_parser.add_argument(
5150
'--all', '-a',
5251
action='store_true',
5352
help=_("apply action on all tools"),
5453
)
55-
tools_group.add_argument(
56-
'--tools', '-t',
54+
args_parser.add_argument(
55+
'tools',
5756
choices=tools_names,
58-
help=_("apply action on this list of tools"),
57+
help=_("apply action on this tool(s)"),
5958
metavar='tool',
60-
nargs='+',
59+
nargs='*',
6160
)
6261
return args_parser
6362

0 commit comments

Comments
 (0)