Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7 from GamestonkTerminal/rich2
Browse files Browse the repository at this point in the history
Add help and source color vars and use rgb
colin99d authored Jan 10, 2022
2 parents d3ef489 + 053c50f commit 33d4c6a
Showing 4 changed files with 21 additions and 9 deletions.
12 changes: 10 additions & 2 deletions gamestonk_terminal/common/quantitative_analysis/qa_view.py
Original file line number Diff line number Diff line change
@@ -606,11 +606,19 @@ def display_line(
if title:
fig.suptitle(title)
fig.tight_layout(pad=2)

if gtff.USE_ION:
plt.ion()
if gtff.USE_WATERMARK:
ax.text(.73, 0.025, 'Gamestonk Terminal', transform=ax.transAxes, fontsize=12, color='gray', alpha=0.5)
ax.text(
0.73,
0.025,
"Gamestonk Terminal",
transform=ax.transAxes,
fontsize=12,
color="gray",
alpha=0.5,
)

if draw:
LineAnnotateDrawer(ax).draw_lines_and_annotate()
4 changes: 2 additions & 2 deletions gamestonk_terminal/helper_funcs.py
Original file line number Diff line number Diff line change
@@ -654,8 +654,8 @@ def parse_known_args_and_warn(
return None

if ns_parser.help:
parser.print_help()
console.print("")
txt_help = parser.format_help()
console.print(f"[help]{txt_help}[/help]")
return None

if l_unknown_args:
8 changes: 6 additions & 2 deletions gamestonk_terminal/rich_config.py
Original file line number Diff line number Diff line change
@@ -10,12 +10,16 @@
{
# information provided to the user
"info": "thistle1",
# goes into a new menu
"menu": "medium_violet_red",
# triggers a command
"cmds": "light_sky_blue1",
# configurable parameter
"param": "gold3",
# goes into a new menu
"menu": "rgb(175,0,255)",
# data sources,
"src": "rgb(245,245,30)",
# print help,
"help": "green",
# unavailable command/parameter
"unvl": "dim",
}
6 changes: 3 additions & 3 deletions gamestonk_terminal/stocks/stocks_controller.py
Original file line number Diff line number Diff line change
@@ -86,8 +86,8 @@ def print_help(self):
)
else:
stock_text = f"{s_intraday} {self.ticker}"
has_ticker_start = "" if self.ticker else "[dim]"
has_ticker_end = "" if self.ticker else "[/dim]"
has_ticker_start = "" if self.ticker else "[unvl]"
has_ticker_end = "" if self.ticker else "[/unvl]"
help_text = f"""[cmds]
search search a specific stock ticker for analysis
load load a specific stock ticker and additional info for analysis[/cmds][info]
@@ -96,7 +96,7 @@ def print_help(self):
[cmds]
quote view the current price for a specific stock ticker
candle view a candle chart for a specific stock ticker
news latest news of the company [News API][/cmds]
news latest news of the company[/cmds] [src][News API][/src]
[menu]
> options options menu, \t\t\t e.g.: chains, open interest, greeks, parity
> disc discover trending stocks, \t e.g. map, sectors, high short interest

0 comments on commit 33d4c6a

Please sign in to comment.