Skip to content

Commit

Permalink
make intro spin up pywry window with usage basics (#4871)
Browse files Browse the repository at this point in the history
  • Loading branch information
DidierRLopes authored Apr 23, 2023
1 parent 40ea2ce commit 975387b
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions openbb_terminal/terminal_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -501,16 +501,17 @@ def call_funds(self, _):

def call_intro(self, _):
"""Process intro command."""
import json
webbrowser.open("https://docs.openbb.co/terminal/usage/basics")
# import json

intro: dict = json.load((Path(__file__).parent / "intro.json").open()) # type: ignore
# intro: dict = json.load((Path(__file__).parent / "intro.json").open()) # type: ignore

for prompt in intro.get("prompts", []):
console.print(panel.Panel(f"[purple]{prompt['header']}[/purple]"))
console.print("".join(prompt["content"]))
if input("") == "q":
break
console.print("\n")
# for prompt in intro.get("prompts", []):
# console.print(panel.Panel(f"[purple]{prompt['header']}[/purple]"))
# console.print("".join(prompt["content"]))
# if input("") == "q":
# break
# console.print("\n")

def call_exe(self, other_args: List[str]):
"""Process exe command."""
Expand Down Expand Up @@ -705,11 +706,11 @@ def terminal(jobs_cmds: Optional[List[str]] = None, test_mode=False):

if first_time_user():
try:
t_controller.call_intro(None)
# t_controller.call_intro(None)
webbrowser.open("https://docs.openbb.co/terminal/usage/basics")
# TDDO: Fix the CI
except EOFError:
pass

t_controller.print_help()
check_for_updates()

Expand Down

0 comments on commit 975387b

Please sign in to comment.