update README.md

This commit is contained in:
Emmanuel Garette 2018-11-29 22:49:35 +01:00 committed by Emmanuel Garette
parent 4c528c0a17
commit 7e8613e6fb

View file

@ -1,6 +1,6 @@
# tiramisu-cmdline-parser
Parser for command-line options and arguments using Tiramisu engine.
Python3 parser for command-line options and arguments using Tiramisu engine.
# simple example
@ -26,7 +26,7 @@ parser.parse_args()
print('result:', config.value.dict())
```
```
```bash
[gnunux@localhost tiramisu-parser]$ ./prog.py -h
usage: prog.py [-h] [-v] var
@ -38,23 +38,23 @@ optional arguments:
-v, --verbosity increase output verbosity
```
```
```bash
[gnunux@localhost tiramisu-parser]$ ./prog.py -v
usage: prog.py [-h] [-v] var
prog.py: error: the following arguments are required: var
```
```
```bash
[gnunux@localhost tiramisu-parser]$ ./prog.py test
result: {'var': 'test', 'verbosity': False, 'v': False}
```
```
```bash
[gnunux@localhost tiramisu-parser]$ ./prog.py -v test
result: {'var': 'test', 'verbosity': True, 'v': True}
```
```
```bash
[gnunux@localhost tiramisu-parser]$ ./prog.py --verbosity test
result: {'var': 'test', 'verbosity': True, 'v': True}
```