Metadata-Version: 2.1
Name: better-menu
Version: 1.0.13
Summary: A simple but cool menu-creation package
Home-page: https://github.com/C-JeanDev/better_menu
Author: Bilodev, C-JeanDev
Author-email: bilotta.antonio.biz@gmail.com
Keywords: python,menu,selection menu,menu selection,selection,cool menu,cli
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Operating System :: Unix
Classifier: Operating System :: MacOS :: MacOS X
Classifier: Operating System :: Microsoft :: Windows
Description-Content-Type: text/markdown


# Better Menu

better_menu is a [Python](https://www.python.org/) library for creating simple but cool menu(s) very fastly.



# Installation 

Use the package manager [pip](https://pip.pypa.io/en/stable) to install Pydeas

```bash

pip install better_menu

```





## Get Started

#### For an example of the final output check

[here](https://github.com/C-JeanDev/better_menu)



### The menu constructor 

the `Menu` constructor takes in `1 argument (and other optionals 2)` : a menu dictionary that has the voice and a function that will be executed if the voice is chosen



```python

m = {

  '1. Insert User': insert_user,

  '2. Exit': exit

}

```

Now pass the menu to the constructor



```python

from better_menu.menu import Menu



m = {

  '1. Insert User': insert_user,

  '2. Exit': exit

}



menu = Menu(m)

menu.init()

```



### Title and Subtitle

You can add a title and a subtitle that will be printed within the menu



```python

from better_menu.menu import Menu



m = {

  '1. Insert User': insert_user,

  '2. Exit': exit

}



menu = Menu(m)

menu.title('Title')

menu.subtitle('Subitle')

menu.init()

```



### Option Argument (indicator, color)

`Indicator (ind)`: indicate the indicator of the selcted voice



`Color (color)`: indicate the color of the title or subtitle or of the selcted voice if passed to the menu constructor



```python

from better_menu.menu import Menu



m = {

  '1. Insert User': insert_user,

  '2. Exit': exit

}

#set the indicator of the selcted voice to '>' and the color of the selected voice to red

menu = Menu(m, ind='>', color='red') 



# set the color of the title to 'black'

menu.title('Title', color='black') 



# set the color of the subtitle to 'blue'

menu.subtitle('Subitle', color='blue')



menu.init()

```



[Better Menu v1.0.13](https://github.com/C-JeanDev/better_menu)
