chopt-0.0.6
توضیحات
Choose Options using a CLI Checkbox Menu
| ویژگی | مقدار |
|---|---|
| سیستم عامل | OS Independent |
| نام فایل | chopt-0.0.6 |
| نام | chopt |
| نسخه کتابخانه | 0.0.6 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Toby Slight |
| ایمیل نویسنده | tobyslight@gmail.com |
| آدرس صفحه اصلی | https://github.com/tslight/chopt |
| آدرس اینترنتی | https://pypi.org/project/chopt/ |
| مجوز | - |
# CHOOSE OPTIONS
*A simple CLI checkbox menu interface for choosing options.*

Takes a list of options as an argument and returns a list of selected items from
that list.
Options are chosen by entering their corresponding number or name. Multiple
options can be selected in one go. Choices should be separated by spaces.
Also supported is specifying ranges of numbers, in the form *x..y* or *x-y*
(where *x* and *y* are item numbers from the list, eg) 1..5 or 1-5).
Additionally you can use *..x* or *-x* to specify everything up to the number
*x*, and *x..* or *x-* to specify everything from the number *x* until the last
element.
Finally one can use wildcard globbing to match option name strings. For instance
**.py* would match all files with the extension *.py*.
Reserved words are *toggle*, *reset*, *accept* and *quit* (case insensitive). They can
be used to carry out those respective actions. Typing just the first letter also
carries out that action - ie) *t*, toggles all, *r*, resets, etc.
## INSTALLATION
`pip install chopt`
## CLI USAGE
```
usage: chopt [-h] options [options ...]
Create a checkbox menu from a list of options.
positional arguments:
options Options for the menu.
optional arguments:
-h, --help show this help message and exit
```
## PYTHON USAGE
```python
from chopt import chopt
my_list = [ 'item1', 'item2', 'item3' ]
chosen = chopt(my_list)
some_interesting_function(chosen)
```
## EXAMPLES
`chopt $(ls ~/src/chopt)`
`chopt $(shuf -n 100 /usr/share/dict/words)`
`chopt options{1..100}`
نیازمندی
| مقدار | نام |
|---|---|
| - | columns |
نحوه نصب
نصب پکیج whl chopt-0.0.6:
pip install chopt-0.0.6.whl
نصب پکیج tar.gz chopt-0.0.6:
pip install chopt-0.0.6.tar.gz