Skip to content

Commit 9583823

Browse files
authored
Update README.md
1 parent 2a547ac commit 9583823

1 file changed

Lines changed: 62 additions & 2 deletions

File tree

README.md

Lines changed: 62 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,62 @@
1-
# BetterPick
2-
Modern menu selection in command prompt for command lines app!
1+
![image](https://github.com/ScadeBlock/BetterPick/assets/89845150/43628dfe-047f-4b8f-8b67-9f12e9325938)# BetterPick
2+
> Modern menu selection in command prompt for command lines app!
3+
# How to install
4+
Easily download `.py` files from `Release` tab than drag it into your Project folder.
5+
6+
# Examples
7+
> `BetterPick` is very easy too use!
8+
## For regular use:
9+
`Pick("Your menu title goes here!",["Your selection here","Sec1","Sec2"],(True or False - Multiselect) )`
10+
**Note:** In Default, To move up or down selection use key `W,S` . Press `Enter` to submit choose. Also in multichoose , press `Spacebar` to check a selection (To change these key , look for "Change key-binding" in Advance use below)
11+
12+
Code:
13+
```
14+
from BetterPick import Pick
15+
# For single choose
16+
# print(Pick("Your menu title goes here!",["Your selection here","Sec1","Sec2"],False))
17+
# For multiselect
18+
# print(Pick("Your menu title goes here!",["Your selection here","Sec1","Sec2"],True))
19+
```
20+
21+
### Output:
22+
+ Single-Choose (Multiselect = False)
23+
![image](https://github.com/ScadeBlock/BetterPick/assets/89845150/ff7bb2a9-adbb-4591-b811-8e8f7f38d188)
24+
+ Multiselect
25+
![image](https://github.com/ScadeBlock/BetterPick/assets/89845150/37b09583-8986-433e-848f-fee62b324f10)
26+
27+
## For advance-use
28+
+ Set highlight color
29+
```
30+
from BetterPick import Pick
31+
from colorama import Fore
32+
print(Pick("Programming Languages",["Python","Java","C++"],highlight_color=Fore.BLUE))
33+
# Set highlight color to blue
34+
```
35+
> BetterPick's Highlight use [`Colorama`](https://pypi.org/project/colorama/) (Really Good Library).
36+
+ Output
37+
![image](https://github.com/ScadeBlock/BetterPick/assets/89845150/4631f67f-7fd2-41c0-86b5-e2a067d265a5)
38+
------
39+
+ Change indicator
40+
```
41+
import BetterPick
42+
from BetterPick import Pick
43+
BetterPick.INDICATOR = "*"
44+
# Set INDICATOR from ">" to "*"
45+
print(Pick("Programming Languages",["Python","Java","C++"]))
46+
```
47+
+ Output:
48+
![image](https://github.com/ScadeBlock/BetterPick/assets/89845150/1ffdcb42-3331-4db2-a83c-1845184991e3)
49+
---
50+
+ Change Key-binding
51+
```
52+
from BetterPick import Pick
53+
Key = {
54+
"UP":"up arrow", # Change UP key from "W" to Arrow-Up
55+
"DOWN":"down arrow", # Change DOWN key from "S" to Arrow-Down
56+
"SUBMIT":"enter",
57+
"MULTISELECT_CHOOSE":"space"
58+
}
59+
print(Pick("Programming Languages",["Python","Java","C++"],key=Key))
60+
```
61+
---
62+
**Fun Fact:** The menu title argument can be `String` or `Function`!

0 commit comments

Comments
 (0)