Skip to content

Commit

Permalink
rm selene opts
Browse files Browse the repository at this point in the history
  • Loading branch information
JarbasAl committed Jun 14, 2024
1 parent 4cb8b62 commit 45d2745
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 128 deletions.
9 changes: 1 addition & 8 deletions ovos_config_assistant/backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,21 +65,14 @@ def backend_menu(back_handler=None):
elif opt == "pairing":
pairing_menu(back_handler=back_handler)
elif opt == "type":
cfg["backend_type"] = select("Choose backend type", ["offline", "selene", "personal"])
cfg["backend_type"] = select("Choose backend type", ["offline", "personal"])
if cfg["backend_type"] == "personal":
url = "http://0.0.0.0:6712"
cfg["url"] = url
cfg["version"] = "v1"
elif cfg["backend_type"] == "selene":
url = "https://api.mycroft.ai"
cfg["url"] = url
cfg["version"] = "v1"
elif cfg["backend_type"] == "ovos_api":
url = "https://api.openvoiceos.com"
cfg["url"] = url
elif cfg["backend_type"] == "neon_mq":
url = "https://api.neon.ai"
cfg["url"] = url
elif cfg["backend_type"] == "offline":
url = "127.0.0.1"
cfg["url"] = url
Expand Down
40 changes: 2 additions & 38 deletions ovos_config_assistant/microservices.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,13 @@ def microservices_menu(back_handler=None):
put_table([
['Default provider', backend_cfg.get("backend_type", "offline")],
['WolframAlpha provider', api_cfg.get("wolfram_provider", "auto")],
['Weather provider', api_cfg.get("weather_provider", "auto")],
['Geolocation provider', api_cfg.get("geolocation_provider", "auto")],
['Email provider', api_cfg.get("email_provider", "auto")],
])

buttons = [{'label': 'Configure Secrets', 'value': "secrets"},
{'label': 'Configure SMTP', 'value': "smtp"},
{'label': 'Configure Wolfram Alpha', 'value': "wolfram"},
{'label': 'Configure Weather', 'value': "weather"},
{'label': 'Configure Geolocation', 'value': "geo"},
{'label': 'Configure Email', 'value': "email"}]
if back_handler:
Expand All @@ -44,61 +42,27 @@ def microservices_menu(back_handler=None):
opts = ["NeonMQ"]
if api_cfg["email"]["smtp"].get("password"):
opts.insert(0, "SMTP")
if backend_cfg.get("backend_type", "") == "selene":
opts.append("Selene")
provider = select("Choose a email provider", opts)
if provider == "SMTP":
api_cfg["email_provider"] = "smtp"
if provider == "Selene":
api_cfg["email_provider"] = "selene"
if provider == "NeonMQ":
api_cfg["email_provider"] = "neon"
update_mycroft_config({"microservices": api_cfg}, bus=cfg.bus)
elif opt == "geo":
opts = ["OpenStreetMap", "OpenVoiceOS", "NeonMQ"]
if backend_cfg.get("backend_type", "") == "selene":
opts.append("Selene")
opts = ["OpenStreetMap", "OpenVoiceOS"]
provider = select("Choose a geolocation provider", opts)
if provider == "OpenStreetMap":
api_cfg["geolocation_provider"] = "osm"
if provider == "Selene":
api_cfg["geolocation_provider"] = "selene"
if provider == "OpenVoiceOS":
api_cfg["geolocation_provider"] = "ovos"
if provider == "NeonMQ":
api_cfg["geolocation_provider"] = "neon"
update_mycroft_config({"microservices": api_cfg}, bus=cfg.bus)
elif opt == "weather":
opts = ["OpenVoiceOS", "NeonMQ"]
if api_cfg.get("owm_key"):
opts.append("OpenWeatherMap")
if backend_cfg.get("backend_type", "") == "selene":
opts.append("Selene")
provider = select("Choose a weather provider", opts)
if provider == "OpenWeatherMap":
api_cfg["weather_provider"] = "owm"
if provider == "Selene":
api_cfg["weather_provider"] = "selene"
if provider == "OpenVoiceOS":
api_cfg["weather_provider"] = "ovos"
if provider == "NeonMQ":
api_cfg["weather_provider"] = "neon"
update_mycroft_config({"microservices": api_cfg}, bus=cfg.bus)
elif opt == "wolfram":
opts = ["OpenVoiceOS", "NeonMQ"]
opts = ["OpenVoiceOS"]
if api_cfg.get("wolfram_key"):
opts.append("WolframAlpha")
if backend_cfg.get("backend_type", "") == "selene":
opts.append("Selene")
provider = select("Choose a WolframAlpha provider", opts)
if provider == "WolframAlpha":
api_cfg["wolfram_provider"] = "wolfram"
if provider == "Selene":
api_cfg["wolfram_provider"] = "selene"
if provider == "OpenVoiceOS":
api_cfg["wolfram_provider"] = "ovos"
if provider == "NeonMQ":
api_cfg["wolfram_provider"] = "neon"
update_mycroft_config({"microservices": api_cfg}, bus=cfg.bus)
elif opt == "secrets":
data = input_group('Secret Keys', [
Expand Down
82 changes: 0 additions & 82 deletions ovos_config_assistant/module_helpers.py

This file was deleted.

0 comments on commit 45d2745

Please sign in to comment.