Package: menu-zerobeef
Curses MenuA simple menu application for command line enthusiasts written in Python
using curses to be able to write on screen. There are three different types
of menus that is available to the end user for the moment, these are:Simple menuSingle selection menuMulti selection menuTable of contentsTODOProject StructureExamplesMenu and dataRequirementsInstallationCloning the project and installingUsing PyPI (Not yet supported)As a submodule in your own projectUsing setup.py to install (Not yet supported)Example CodePreviewsExample 1Example 2Example 3Example 4Example 5Example 6LicenseTODO[ ] Fixsetup.py[ ] Fix bugs that might appear over timeProject Structure.
├── LICENSE.md
├── README.md
├── images
│   ├── Example1.png
│   ├── Example2.png
│   ├── Example3.png
│   ├── Example4.png
│   ├── Example5.png
│   └── Example6.png
├── pyproject.toml
├── requirements.txt
├── src
│   └── menu_zerobeef
│       ├── Pipfile
│       ├── Pipfile.lock
│       ├── __init__.py
│       ├── data.py
│       ├── example.py
│       ├── main.py
│       ├── menu.py
│       └── setup.py
└── testsExamplesThe examples are located in example.py. Currently
there are three examples in that file. The exaples
that are available are:Menu with submenuSingle selection menuMultiple selection menu
A quicker example can be found underExample Code.Menu and datamenu.pyanddata.pycontains the necceessary information
to create your own menus. You can choose from the same
menu types as in thepreviews, or define
your own menu item by extending MenuItem class fromdata.py.RequirementsFollowing is a shorter version of the requirements
for running the project:asttokens==2.0.5colorama==0.4.5executing==0.8.3icecream==2.1.2Pygments==2.12.0six==1.16.0More requirements can be found inrequirements.txtInstallationWhen installing in your own project, be sure to follow one of following steps:Cloning the project and installingUsing PyPI (Not yet supported)As a submodule in your own projectUsing setup.py to installUsing a release file from the repositoryCloning and installingChange directory to your own project where you are going to use the modulegit clone https://github.com/erikkamph/project_menuAdd/project_menu/to a.gitignorefile as it should not be pushed to your own git repository, do this for every.gitignore.SeeExample Codeand see what you need to change and how to use.Using PyPIThis method is not yet supported.Creating a submodule in projectEnter the same git directory as your own project you want to add this toExecute followinggit submodule add https://github.com/erikkamph/project_menu. This will add the project as a submodule for your project.Check that it has been added by runninggit statusSeeExample Codeand see what you need to change to import it properlyGood work! You can now use the classes to create a menu.Important regarding submodulesNone of the code will follow for users of your project when using submodules.Users that clone afterwards will need following steps:git submodule initgit submodule updateThe steps for all of this can be found atGit - Submodules.Using setup file to installChange directory tosrc/menu_zerobeef.Runpython setup.py installto install.The project should be installed now.SeeExample CodeUsing a release fileGo toreleasesDownload the latest file that ends in.whlIn your project, if it has venv activate it.pip install <path_to_whl>where<path_to_whl>is the path to the newly downloaded.whlfile.SeeExample Codefor examplesYou should be good to go.Example CodeThe following is an example that can be used to
show how to implement the menu. If you the project
using local methods such asgit submoduleorgit clone,
you might have to change the first two rows from sayingfrom menu_zerobeef.datain the beginning tofrom project_menu.src.menu_zerobeef.data.frommenu_zerobeef.dataimport(ItemMultiSelection,ItemSingleSelection,MenuItem)frommenu_zerobeef.menuimportApplicationMenuimportcursesdeftest(stdscr):curses.start_color()curses.use_default_colors()menu_title="Muti Selection Test"items=[ItemMultiSelection(str(i),i)foriinrange(0,33)]test=ApplicationMenu(stdscr,(items,menu_title))test.show_menu()curses.wrapper(test)PreviewsExample 1Example 2Example 3Example 4Example 5Example 6LicenseThe program was licensed under the MIT license,
for more information seeLICENSE.mdor visitchoosealicense.com.