summaryrefslogtreecommitdiffstats
path: root/openbb_terminal
diff options
context:
space:
mode:
authorDanglewood <85772166+deeleeramone@users.noreply.github.com>2023-11-16 14:02:59 -0800
committerGitHub <noreply@github.com>2023-11-16 17:02:59 -0500
commit757fc571746e4833704a04fd60bbd69d65f5ba0b (patch)
tree52529097720692b36df1abd46ce7a4ca53198e62 /openbb_terminal
parentbe7f0c30d2b8136f58ca39e2c1e70a27e017e6b7 (diff)
docs/fix-urls: Updates the Terminal About URLs to match `/develop` (#5720)
* update Terminal about URLs and some other broken links * ruff * intro * changing the heading levels * dependency management sections * structure * developer guides * structure * contributor guides * keywords and descriptions * broken urls * cool cards * Cool cards (#5727) * tidy up terminal/content * some more tidy up * fix styling for platform that was missing * more tidy up * improve color for dark and light mode * create new reference card for more basic cards * rename back to menus * implement all index.md for terminal, except reference * improve bot title * more refactoring * fix remaining index * header styling * more styling * heheheheheheeh * Revert "heheheheheheeh" This reverts commit 7d095fcfd258efb7e82b75b4663b5360785195f3. * Ccards (#5733) * links * more links * improved styling and chevron aligned to title * fix index.mdx urls for Terminal * update package.json * update index.mdx * fix generation * spelling * toolkit_extensions * update data extensions * couple of links * add tiingo to data extensions list --------- Co-authored-by: hjoaquim <h.joaquim@campus.fct.unl.pt> Co-authored-by: andrewkenreich <andrew.kenreich@gmail.com> Co-authored-by: DidierRLopes <dro.lopes@campus.fct.unl.pt> Co-authored-by: James Maslek <jmaslek11@gmail.com>
Diffstat (limited to 'openbb_terminal')
-rw-r--r--openbb_terminal/miscellaneous/documentation_scripts/generate_documentation_commands.py4
-rw-r--r--openbb_terminal/portfolio/portfolio_optimization/parameters/params_controller.py2
-rw-r--r--openbb_terminal/terminal_helper.py80
3 files changed, 53 insertions, 33 deletions
diff --git a/openbb_terminal/miscellaneous/documentation_scripts/generate_documentation_commands.py b/openbb_terminal/miscellaneous/documentation_scripts/generate_documentation_commands.py
index eb0e7a4d58c..28f8a0f6a5d 100644
--- a/openbb_terminal/miscellaneous/documentation_scripts/generate_documentation_commands.py
+++ b/openbb_terminal/miscellaneous/documentation_scripts/generate_documentation_commands.py
@@ -23,9 +23,7 @@ EN_FILE = I18N_DICT_LOCATION / "en.yml"
MD_FILES = ["CONTRIBUTING.md", "README.md", "openbb_terminal/SDK_README.md"]
MD_FILES.extend(glob.glob("website/content/sdk/faqs/*.md", recursive=True))
MD_FILES.extend(glob.glob("website/content/terminal/usage/*.md", recursive=True))
-MD_FILES.extend(
- glob.glob("website/content/terminal/data-available/*.md", recursive=True)
-)
+MD_FILES.extend(glob.glob("website/content/terminal/menus/*.md", recursive=True))
MD_FILES.extend(glob.glob("website/content/sdk/usage/*.md", recursive=True))
MD_FILES.extend(glob.glob("website/content/sdk/data-available/*.md", recursive=True))
diff --git a/openbb_terminal/portfolio/portfolio_optimization/parameters/params_controller.py b/openbb_terminal/portfolio/portfolio_optimization/parameters/params_controller.py
index b4debb8ee34..0a5a4acd406 100644
--- a/openbb_terminal/portfolio/portfolio_optimization/parameters/params_controller.py
+++ b/openbb_terminal/portfolio/portfolio_optimization/parameters/params_controller.py
@@ -79,7 +79,7 @@ class ParametersController(BaseController):
self.DATA_FILES = params_helpers.load_data_files()
if session and get_current_user().preferences.USE_PROMPT_TOOLKIT:
- choices: dict = self.choices_default
+ choices: dict = {c: {} for c in self.controller_choices}
choices["set"] = {c: None for c in self.models}
choices["set"]["--model"] = {c: None for c in self.models}
choices["set"]["-m"] = "--model"
diff --git a/openbb_terminal/terminal_helper.py b/openbb_terminal/terminal_helper.py
index 51b7e1a8469..9c3b062d717 100644
--- a/openbb_terminal/terminal_helper.py
+++ b/openbb_terminal/terminal_helper.py
@@ -131,70 +131,86 @@ def update_terminal():
return 0
-def open_openbb_documentation(
+def open_openbb_documentation( # noqa: PLR0912
path,
- url="https://my.openbb.co/app/terminal",
+ url="https://docs.openbb.co/terminal",
command=None,
arg_type="",
):
"""Opens the documentation page based on your current location within the terminal. Make exceptions for menus
that are considered 'common' by adjusting the path accordingly."""
if path == "/" and command is None:
- path = "/usage?path=/usage/structure-and-navigation"
+ path = "/usage/overview/structure-and-navigation"
command = ""
elif "keys" in path:
- path = "/usage?path=/usage/data/api-keys"
+ path = "/usage/data/api-keys"
command = ""
elif "settings" in path:
- path = "/usage?path=/usage/overview/customizing-the-terminal"
+ path = "/usage/overview/customizing-the-terminal"
command = ""
elif "featflags" in path:
- path = "/usage?path=/usage/overview/customizing-the-terminal#feature-flags-menu"
+ path = "/usage/overview/customizing-the-terminal#feature-flags-menu"
command = ""
elif "sources" in path:
- path = "/usage?path=/usage/usage/data/data-sources"
+ path = "/usage/usage/data/data-sources"
command = ""
elif "account" in path:
- path = "/usage?path=/usage/hub"
+ path = "/usage/hub"
command = ""
elif arg_type == "command": # user passed a command name
if command in ["settings", "featflags"]:
- path = "/usage?path=/usage/overview/customizing-the-terminal"
+ path = "/usage/overview/customizing-the-terminal"
command = ""
else:
- path = f"/commands?path={path}"
+ path = f"/reference/{path}"
+ elif "askobb" in path:
+ path = "/usage/askobb-feature"
+ command = ""
elif arg_type == "menu": # user passed a menu name
- if command in ["ta", "ba", "qa"]:
+ if command in ["ta", "qa"]:
menu = path.split("/")[-2]
- path = f"/usage?path=/data-available/common/{menu}"
+ path = f"/menus/common/{menu}"
+ elif command == "stocks":
+ path = "/menus/stocks/introduction"
+ command = ""
elif command == "forecast":
command = ""
- path = "/usage?path=/data-available/forecast"
+ path = "/menus/forecast"
+ elif command == "crypto":
+ path = "/menus/crypto/introduction"
+ command = ""
+
else:
- path = f"/usage?path=/data-available/{path}"
+ path = f"/menus/{path}"
else: # user didn't pass argument and is in a menu
menu = path.split("/")[-2]
- path = (
- f"/usage?path=/data-available/common/{menu}"
- if menu in ["ta", "ba", "qa"]
- else f"/usage?path=/data-available/{path}"
- )
+ if menu == "crypto" and not command:
+ path = "/crypto/introduction"
+ if menu == "stocks":
+ path = "/stocks/introduction"
+ path = f"/menus/common/{menu}" if menu in ["ta", "qa"] else f"/menus/{path}"
if command:
if command == "keys":
- path = "/usage?path=/usage/data/api-keys"
+ path = "/usage/data/api-keys"
command = ""
elif "settings" in path or "featflags" in path:
- path = "/usage?path=/usage/overview/customizing-the-terminal"
+ path = "/usage/overview/customizing-the-terminal"
command = ""
elif "sources" in path:
- path = "/usage?path=/usage/data/data-sources"
+ path = "/usage/data/data-sources"
command = ""
elif command in ["record", "stop", "exe"]:
- path = "/usage?path=/usage/routines/introduction-to-routines"
+ path = "/usage/routines/introduction-to-routines"
command = ""
elif command == "sources":
- path = "/usage?path=/usage/data/data-sources"
+ path = "/usage/data/data-sources"
+ command = ""
+ elif command == "askobb":
+ path = "/usage/askobb-feature"
+ command = ""
+ elif command == "news":
+ path = "/usage/overview/commands-and-arguments#help-arguments"
command = ""
elif command in [
"intro",
@@ -203,15 +219,21 @@ def open_openbb_documentation(
"survey",
"update",
"wiki",
- "news",
- "account",
]:
path = "/usage"
command = ""
- elif command in ["ta", "ba", "qa"]:
- path = f"/usage?path=/data-available/common/{command}"
+ elif command in ["ta", "qa"]:
+ path = f"/menus/common/{command}"
+ command = ""
+ elif command == "stocks":
+ path = "/menus/stocks/introduction"
+ command = ""
+ elif command == "account":
+ path = "/usage/hub"
+ command = ""
+ elif command == "news":
+ path = "/usage/overview/commands-and-arguments#help-arguments"
command = ""
-
path += command
full_url = f"{url}{path.replace('//', '/')}"