11# Generic Parser
2- [ ![ Cron Testing] ( https://github.com/pylhc/generic_parser/workflows/Cron%20Testing/badge.svg )] ( https://github.com/pylhc/generic_parser/actions?query=workflow%3A%22Cron+Testing%22 )
3- [ ![ Code Climate coverage] ( https://img.shields.io/codeclimate/coverage/pylhc/generic_parser.svg?style=popout )] ( https://codeclimate.com/github/pylhc/generic_parser )
4- [ ![ Code Climate maintainability (percentage)] ( https://img.shields.io/codeclimate/maintainability-percentage/pylhc/generic_parser.svg?style=popout )] ( https://codeclimate.com/github/pylhc/generic_parser )
5- <!-- [](https://github.com/pylhc/generic_parser/) -->
2+
3+ [ ![ Tests] ( https://github.com/pylhc/generic_parser/actions/workflows/coverage.yml/badge.svg?branch=master )] ( https://github.com/pylhc/generic_parser/actions/workflows/coverage.yml )
4+ [ ![ GitHub last commit] ( https://img.shields.io/github/last-commit/pylhc/generic_parser.svg?style=popout )] ( https://github.com/pylhc/generic_parser/ )
65[ ![ PyPI Version] ( https://img.shields.io/pypi/v/generic_parser?label=PyPI&logo=pypi )] ( https://pypi.org/project/generic_parser/ )
76[ ![ GitHub release] ( https://img.shields.io/github/v/release/pylhc/generic_parser?logo=github )] ( https://github.com/pylhc/generic_parser/ )
87[ ![ Conda-forge Version] ( https://img.shields.io/conda/vn/conda-forge/generic_parser?color=orange&logo=anaconda )] ( https://anaconda.org/conda-forge/generic_parser )
@@ -16,18 +15,21 @@ See the [API documentation](https://pylhc.github.io/generic_parser/) for details
1615## Installing
1716
1817Installation is easily done via ` pip ` . The package is then used as ` generic_parser ` .
18+
1919``` bash
2020python -m pip install generic-parser
2121```
2222
2323One can also install in a ` conda ` environment via the ` conda-forge ` channel with:
24+
2425``` bash
2526conda install -c conda-forge generic_parser
2627```
2728
28- ## Example Usage:
29+ ## Example
2930
3031Content of ` myscript.py `
32+
3133``` python
3234from generic_parser import entrypoint, EntryPointParameters
3335
@@ -64,7 +66,8 @@ if __name__ == '__main__':
6466### Commandline
6567
6668Calling that script with `` python myscript.py -f 1 -s "test" `` will result in:
67- ```
69+
70+ ``` bash
6871True
6972False
7073```
@@ -74,14 +77,16 @@ It is assumed, that this is the standard mode of operation for your functions.
7477#### Config File
7578
7679Further, one can also use a config file ` config.ini ` containing:
77- ```
80+
81+ ``` ini
7882[Section]
7983first = 2
8084second = " Hello"
8185```
8286
8387and run the script with ` python myscript.py --entry_cfg config.ini ` leading to
84- ```
88+
89+ ``` bash
8590False
8691False
8792```
@@ -91,13 +96,15 @@ Especially the declaration of a `[DEFAULT]` section can be helpful.
9196For further information about config files, check the python [ Config Parser] ( https://docs.python.org/3/library/configparser.html ) .
9297
9398### Python
99+
94100Or call the function directly from python code:
101+
95102``` python
96103if __name__ == ' __main__' :
97104 main(first = 1 , second = " World" )
98105```
99106
100- ```
107+ ``` python
101108True
102109False
103110```
@@ -111,4 +118,4 @@ which is not used in the `Entrypoint`, but can be handy in other use-cases.
111118
112119## License
113120
114- This project is licensed under the MIT License - see the [ LICENSE.md] ( LICENSE.md ) file for details
121+ This project is licensed under the MIT License - see the [ LICENSE.md] ( LICENSE.md ) file for details.
0 commit comments