mirror of
https://github.com/PiBrewing/craftbeerpi4.git
synced 2024-11-24 16:08:11 +01:00
Merge pull request #88 from prash3r/fix-for-cli-create-issue-87
Fix for cli create issue 87
This commit is contained in:
commit
d033a908e3
7 changed files with 286 additions and 12 deletions
28
cbpi/cli.py
28
cbpi/cli.py
|
@ -15,7 +15,7 @@ from colorama import Fore, Back, Style
|
|||
import importlib
|
||||
from importlib_metadata import metadata
|
||||
from tabulate import tabulate
|
||||
from inquirer import prompt
|
||||
import inquirer
|
||||
import platform
|
||||
import time
|
||||
|
||||
|
@ -74,19 +74,17 @@ class CraftBeerPiCli():
|
|||
print(Fore.LIGHTGREEN_EX, tabulate(result, headers="keys"), Style.RESET_ALL)
|
||||
|
||||
|
||||
def plugin_create(self):
|
||||
def plugin_create(self, pluginName):
|
||||
print("Plugin Creation")
|
||||
print("")
|
||||
|
||||
questions = [
|
||||
{
|
||||
'type': 'input',
|
||||
'name': 'name',
|
||||
'message': 'Plugin Name:',
|
||||
}
|
||||
]
|
||||
questions = [ inquirer.Text('name', message='Plugin Name (will be prefixed with "cbpi4-")', default=pluginName),]
|
||||
|
||||
answers = prompt(questions)
|
||||
answers = inquirer.prompt(questions)
|
||||
|
||||
if answers["name"] == "":
|
||||
print("you failed to provide a name for the new plugin - terminating")
|
||||
return
|
||||
|
||||
name = "cbpi4-" + str(answers["name"]).replace('_', '-').replace(' ', '-')
|
||||
if os.path.exists(os.path.join(".", name)) is True:
|
||||
|
@ -284,9 +282,15 @@ def plugins(context):
|
|||
|
||||
@main.command()
|
||||
@click.pass_context
|
||||
def create(context):
|
||||
@click.argument('pluginname', nargs=-1, required=False)
|
||||
def create(context, pluginname=[]):
|
||||
'''Create New Plugin'''
|
||||
context.obj.plugin_create()
|
||||
sentence = ""
|
||||
for word in pluginname:
|
||||
if sentence != "":
|
||||
sentence += " "
|
||||
sentence += word
|
||||
context.obj.plugin_create(sentence)
|
||||
|
||||
@main.command()
|
||||
@click.pass_context
|
||||
|
|
55
cbpi4.egg-info/PKG-INFO
Normal file
55
cbpi4.egg-info/PKG-INFO
Normal file
|
@ -0,0 +1,55 @@
|
|||
Metadata-Version: 2.1
|
||||
Name: cbpi4
|
||||
Version: 4.0.6
|
||||
Summary: CraftBeerPi4 Brewing Software
|
||||
Home-page: http://web.craftbeerpi.com
|
||||
Author: Manuel Fritsch / Alexander Vollkopf
|
||||
Author-email: manuel@craftbeerpi.com
|
||||
License: GPLv3
|
||||
Project-URL: Documentation, https://openbrewing.gitbook.io/craftbeerpi4_support/
|
||||
Platform: UNKNOWN
|
||||
Requires-Python: >=3.9
|
||||
Description-Content-Type: text/markdown
|
||||
License-File: LICENSE
|
||||
|
||||
# CraftBeerPi 4
|
||||
|
||||
[![Build](https://github.com/avollkopf/craftbeerpi4/actions/workflows/build.yml/badge.svg)](https://github.com/avollkopf/craftbeerpi4/actions/workflows/build.yml)
|
||||
[![GitHub license](https://img.shields.io/github/license/avollkopf/craftbeerpi4)](https://github.com/avollkopf/craftbeerpi4/blob/master/LICENSE)
|
||||
![GitHub issues](https://img.shields.io/github/issues-raw/avollkopf/craftbeerpi4)
|
||||
![PyPI](https://img.shields.io/pypi/v/cbpi4)
|
||||
![Happy Brewing](https://img.shields.io/badge/CraftBeerPi%204-Happy%20Brewing-%23FBB117)
|
||||
|
||||
<p align="center">
|
||||
<img src="https://github.com/avollkopf/craftbeerpi4-ui/blob/main/cbpi4gui/public/logo192.png?raw=true" alt="CraftBeerPi Logo"/>
|
||||
</p>
|
||||
|
||||
CraftBeerPi 4 is an open source software solution to control the brewing and
|
||||
fermentation of beer :beer:.
|
||||
|
||||
## 📚 Documentation
|
||||
Instructions on how to install CraftBeerPi and use its plugins is described
|
||||
in the documentation, that can be found here: [gitbook.io](https://openbrewing.gitbook.io/craftbeerpi4_support/).
|
||||
|
||||
### Plugins
|
||||
Plugins extend the base functionality of CraftBeerPi 4.
|
||||
You can find a list of available plugins [here](https://openbrewing.gitbook.io/craftbeerpi4_support/master/plugin-installation#plugin-list).
|
||||
|
||||
## 🧑🤝🧑 Contribute
|
||||
You want to help develop CraftBeerPi4? To get you quickly stated, this repository comes with a preconfigured
|
||||
development environment. To be able to use this environment you need 2 things installed on your computer:
|
||||
|
||||
- docker
|
||||
- visual studio code (vscode)
|
||||
|
||||
To start developing clone this repository, open the folder in vscode and use the _development container_ feature. The command is called _Reopen in container_. Please note that this quick start setup does not work if you want to develop directly on a 32bit raspberry pi os because docker is only available for 64bit arm plattform. Please use the regular development setup for that.
|
||||
|
||||
For a more detailed description of a development setup without the _development container_ feature see the documentation page:
|
||||
[gitbook.io](https://openbrewing.gitbook.io/craftbeerpi4_support/)
|
||||
|
||||
### Contributors
|
||||
Thanks to all the people who have contributed
|
||||
|
||||
[![contributors](https://contributors-img.web.app/image?repo=avollkopf/craftbeerpi4)](https://github.com/avollkopf/craftbeerpi4/graphs/contributors)
|
||||
|
||||
|
186
cbpi4.egg-info/SOURCES.txt
Normal file
186
cbpi4.egg-info/SOURCES.txt
Normal file
|
@ -0,0 +1,186 @@
|
|||
LICENSE
|
||||
MANIFEST.in
|
||||
README.md
|
||||
setup.py
|
||||
cbpi/__init__.py
|
||||
cbpi/cli.py
|
||||
cbpi/configFolder.py
|
||||
cbpi/craftbeerpi.py
|
||||
cbpi/eventbus.py
|
||||
cbpi/satellite.py
|
||||
cbpi/websocket.py
|
||||
cbpi4.egg-info/PKG-INFO
|
||||
cbpi4.egg-info/SOURCES.txt
|
||||
cbpi4.egg-info/dependency_links.txt
|
||||
cbpi4.egg-info/entry_points.txt
|
||||
cbpi4.egg-info/requires.txt
|
||||
cbpi4.egg-info/top_level.txt
|
||||
cbpi/api/__init__.py
|
||||
cbpi/api/actor.py
|
||||
cbpi/api/base.py
|
||||
cbpi/api/config.py
|
||||
cbpi/api/dataclasses.py
|
||||
cbpi/api/decorator.py
|
||||
cbpi/api/exceptions.py
|
||||
cbpi/api/extension.py
|
||||
cbpi/api/fermenter_logic.py
|
||||
cbpi/api/kettle_logic.py
|
||||
cbpi/api/property.py
|
||||
cbpi/api/sensor.py
|
||||
cbpi/api/step.py
|
||||
cbpi/api/timer.py
|
||||
cbpi/config/actor.json
|
||||
cbpi/config/chromium.desktop
|
||||
cbpi/config/config.json
|
||||
cbpi/config/config.yaml
|
||||
cbpi/config/craftbeerpi.service
|
||||
cbpi/config/craftbeerpiboot
|
||||
cbpi/config/create_database.sql
|
||||
cbpi/config/fermenter_data.json
|
||||
cbpi/config/kettle.json
|
||||
cbpi/config/plugin_list.txt
|
||||
cbpi/config/sensor.json
|
||||
cbpi/config/splash.png
|
||||
cbpi/config/step_data.json
|
||||
cbpi/config/dashboard/cbpi_dashboard_1.json
|
||||
cbpi/controller/__init__.py
|
||||
cbpi/controller/actor_controller.py
|
||||
cbpi/controller/basic_controller2.py
|
||||
cbpi/controller/config_controller.py
|
||||
cbpi/controller/dashboard_controller.py
|
||||
cbpi/controller/fermentation_controller.py
|
||||
cbpi/controller/fermenter_recipe_controller.py
|
||||
cbpi/controller/job_controller.py
|
||||
cbpi/controller/kettle_controller.py
|
||||
cbpi/controller/log_file_controller.py
|
||||
cbpi/controller/notification_controller.py
|
||||
cbpi/controller/plugin_controller.py
|
||||
cbpi/controller/recipe_controller.py
|
||||
cbpi/controller/satellite_controller.py
|
||||
cbpi/controller/sensor_controller.py
|
||||
cbpi/controller/step_controller.py
|
||||
cbpi/controller/system_controller.py
|
||||
cbpi/controller/upload_controller.py
|
||||
cbpi/extension/__init__.py
|
||||
cbpi/extension/ConfigUpdate/__init__.py
|
||||
cbpi/extension/ConfigUpdate/config.yaml
|
||||
cbpi/extension/ConfigUpdate/__pycache__/__init__.cpython-37.pyc
|
||||
cbpi/extension/ConfigUpdate/__pycache__/__init__.cpython-39.pyc
|
||||
cbpi/extension/FermentationStep/__init__.py
|
||||
cbpi/extension/FermentationStep/config.yaml
|
||||
cbpi/extension/FermentationStep/__pycache__/__init__.cpython-37.pyc
|
||||
cbpi/extension/FermentationStep/__pycache__/__init__.cpython-39.pyc
|
||||
cbpi/extension/FermenterHysteresis/__init__.py
|
||||
cbpi/extension/FermenterHysteresis/config.yaml
|
||||
cbpi/extension/FermenterHysteresis/__pycache__/__init__.cpython-37.pyc
|
||||
cbpi/extension/FermenterHysteresis/__pycache__/__init__.cpython-39.pyc
|
||||
cbpi/extension/__pycache__/__init__.cpython-37.pyc
|
||||
cbpi/extension/__pycache__/__init__.cpython-39.pyc
|
||||
cbpi/extension/dummyactor/__init__.py
|
||||
cbpi/extension/dummyactor/config.yaml
|
||||
cbpi/extension/dummyactor/__pycache__/__init__.cpython-37.pyc
|
||||
cbpi/extension/dummyactor/__pycache__/__init__.cpython-39.pyc
|
||||
cbpi/extension/dummysensor/__init__.py
|
||||
cbpi/extension/dummysensor/config.yaml
|
||||
cbpi/extension/dummysensor/__pycache__/__init__.cpython-37.pyc
|
||||
cbpi/extension/dummysensor/__pycache__/__init__.cpython-39.pyc
|
||||
cbpi/extension/gpioactor/__init__.py
|
||||
cbpi/extension/gpioactor/config.yaml
|
||||
cbpi/extension/gpioactor/__pycache__/__init__.cpython-37.pyc
|
||||
cbpi/extension/gpioactor/__pycache__/__init__.cpython-39.pyc
|
||||
cbpi/extension/httpsensor/__init__.py
|
||||
cbpi/extension/httpsensor/config.yaml
|
||||
cbpi/extension/httpsensor/__pycache__/__init__.cpython-37.pyc
|
||||
cbpi/extension/httpsensor/__pycache__/__init__.cpython-39.pyc
|
||||
cbpi/extension/hysteresis/__init__.py
|
||||
cbpi/extension/hysteresis/config.yaml
|
||||
cbpi/extension/hysteresis/__pycache__/__init__.cpython-37.pyc
|
||||
cbpi/extension/hysteresis/__pycache__/__init__.cpython-39.pyc
|
||||
cbpi/extension/mashstep/__init__.py
|
||||
cbpi/extension/mashstep/config.yaml
|
||||
cbpi/extension/mashstep/__pycache__/__init__.cpython-37.pyc
|
||||
cbpi/extension/mashstep/__pycache__/__init__.cpython-39.pyc
|
||||
cbpi/extension/mqtt_actor/__init__.py
|
||||
cbpi/extension/mqtt_actor/config.yaml
|
||||
cbpi/extension/mqtt_actor/generic_mqtt_actor.py
|
||||
cbpi/extension/mqtt_actor/mqtt_actor.py
|
||||
cbpi/extension/mqtt_actor/tasmota_mqtt_actor.py
|
||||
cbpi/extension/mqtt_actor/__pycache__/__init__.cpython-37.pyc
|
||||
cbpi/extension/mqtt_actor/__pycache__/__init__.cpython-39.pyc
|
||||
cbpi/extension/mqtt_actor/__pycache__/generic_mqtt_actor.cpython-37.pyc
|
||||
cbpi/extension/mqtt_actor/__pycache__/generic_mqtt_actor.cpython-39.pyc
|
||||
cbpi/extension/mqtt_actor/__pycache__/mqtt_actor.cpython-37.pyc
|
||||
cbpi/extension/mqtt_actor/__pycache__/mqtt_actor.cpython-39.pyc
|
||||
cbpi/extension/mqtt_actor/__pycache__/tasmota_mqtt_actor.cpython-37.pyc
|
||||
cbpi/extension/mqtt_actor/__pycache__/tasmota_mqtt_actor.cpython-39.pyc
|
||||
cbpi/extension/mqtt_sensor/__init__.py
|
||||
cbpi/extension/mqtt_sensor/config.yaml
|
||||
cbpi/extension/mqtt_sensor/__pycache__/__init__.cpython-37.pyc
|
||||
cbpi/extension/mqtt_sensor/__pycache__/__init__.cpython-39.pyc
|
||||
cbpi/extension/mqtt_util/__init__.py
|
||||
cbpi/extension/mqtt_util/config.yaml
|
||||
cbpi/extension/mqtt_util/__pycache__/__init__.cpython-37.pyc
|
||||
cbpi/extension/mqtt_util/__pycache__/__init__.cpython-39.pyc
|
||||
cbpi/extension/onewire/__init__.py
|
||||
cbpi/extension/onewire/config.yaml
|
||||
cbpi/extension/onewire/__pycache__/__init__.cpython-37.pyc
|
||||
cbpi/extension/onewire/__pycache__/__init__.cpython-39.pyc
|
||||
cbpi/http_endpoints/__init__.py
|
||||
cbpi/http_endpoints/http_actor.py
|
||||
cbpi/http_endpoints/http_config.py
|
||||
cbpi/http_endpoints/http_dashboard.py
|
||||
cbpi/http_endpoints/http_fermentation.py
|
||||
cbpi/http_endpoints/http_fermenterrecipe.py
|
||||
cbpi/http_endpoints/http_kettle.py
|
||||
cbpi/http_endpoints/http_log.py
|
||||
cbpi/http_endpoints/http_login.py
|
||||
cbpi/http_endpoints/http_notification.py
|
||||
cbpi/http_endpoints/http_plugin.py
|
||||
cbpi/http_endpoints/http_recipe.py
|
||||
cbpi/http_endpoints/http_sensor.py
|
||||
cbpi/http_endpoints/http_step.py
|
||||
cbpi/http_endpoints/http_system.py
|
||||
cbpi/http_endpoints/http_upload.py
|
||||
cbpi/job/__init__.py
|
||||
cbpi/job/_job.py
|
||||
cbpi/job/_scheduler.py
|
||||
cbpi/job/aiohttp.py
|
||||
cbpi/static/beer_icon.svg
|
||||
cbpi/static/calculator_icon.svg
|
||||
cbpi/static/cbpi_icon.svg
|
||||
cbpi/static/control_icon.svg
|
||||
cbpi/static/glass_icon.svg
|
||||
cbpi/static/grain.svg
|
||||
cbpi/static/hops_icon.svg
|
||||
cbpi/static/kettle2_icon.svg
|
||||
cbpi/static/kettle_icon.svg
|
||||
cbpi/static/led.svg
|
||||
cbpi/static/liquid_icon.svg
|
||||
cbpi/static/paddle_icon.svg
|
||||
cbpi/static/pipe_icon.svg
|
||||
cbpi/static/sensor_icon.svg
|
||||
cbpi/static/splash.png
|
||||
cbpi/static/svg_icon.svg
|
||||
cbpi/static/tank_icon.svg
|
||||
cbpi/static/target_temp.svg
|
||||
cbpi/static/test.html
|
||||
cbpi/static/thermomenter.svg
|
||||
cbpi/static/yeast.svg
|
||||
cbpi/utils/__init__.py
|
||||
cbpi/utils/encoder.py
|
||||
cbpi/utils/utils.py
|
||||
tests/__init__.py
|
||||
tests/cbpi_config_fixture.py
|
||||
tests/test_actor.py
|
||||
tests/test_cli.py
|
||||
tests/test_config.py
|
||||
tests/test_dashboard.py
|
||||
tests/test_gpio.py
|
||||
tests/test_index.py
|
||||
tests/test_kettle.py
|
||||
tests/test_logger.py
|
||||
tests/test_notification_controller.py
|
||||
tests/test_sensor.py
|
||||
tests/test_step.py
|
||||
tests/test_system.py
|
||||
tests/test_ws.py
|
1
cbpi4.egg-info/dependency_links.txt
Normal file
1
cbpi4.egg-info/dependency_links.txt
Normal file
|
@ -0,0 +1 @@
|
|||
https://testpypi.python.org/pypi
|
3
cbpi4.egg-info/entry_points.txt
Normal file
3
cbpi4.egg-info/entry_points.txt
Normal file
|
@ -0,0 +1,3 @@
|
|||
[console_scripts]
|
||||
cbpi = cbpi.cli:main
|
||||
|
23
cbpi4.egg-info/requires.txt
Normal file
23
cbpi4.egg-info/requires.txt
Normal file
|
@ -0,0 +1,23 @@
|
|||
aiohttp==3.8.1
|
||||
aiohttp-auth==0.1.1
|
||||
aiohttp-route-decorator==0.1.4
|
||||
aiohttp-security==0.4.0
|
||||
aiohttp-session==2.11.0
|
||||
aiohttp-swagger==1.0.16
|
||||
aiojobs==1.0.0
|
||||
aiosqlite==0.17.0
|
||||
cryptography==36.0.1
|
||||
requests==2.27.1
|
||||
voluptuous==0.12.2
|
||||
pyfiglet==0.8.post1
|
||||
click==8.0.4
|
||||
shortuuid==1.0.8
|
||||
tabulate==0.8.9
|
||||
asyncio-mqtt
|
||||
PyInquirer==1.0.3
|
||||
colorama==0.4.4
|
||||
psutil==5.9.0
|
||||
cbpi4gui
|
||||
importlib_metadata
|
||||
numpy==1.22.2
|
||||
pandas==1.4.1
|
2
cbpi4.egg-info/top_level.txt
Normal file
2
cbpi4.egg-info/top_level.txt
Normal file
|
@ -0,0 +1,2 @@
|
|||
cbpi
|
||||
tests
|
Loading…
Reference in a new issue