mirror of
https://github.com/OpenBB-finance/OpenBB.git
synced 2026-10-27 04:31:13 +00:00
Small improvement on fa/analysis and new image for discord bot (#764)
* small improv on fa/analysis based on data author suggestion * add image of logo with white background for discord bot
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
__docformat__ = "numpy"
|
||||
|
||||
import requests
|
||||
from colorama import Style
|
||||
|
||||
# pylint: disable=R1718
|
||||
|
||||
@@ -23,11 +24,25 @@ def get_filings_analysis(ticker: str) -> str:
|
||||
|
||||
if result.status_code == 200:
|
||||
if result.json():
|
||||
return "\n\n".join(
|
||||
rf_highlights = f"{Style.BRIGHT}\n\tRISK FACTORS:{Style.RESET_ALL}\n"
|
||||
rf_highlights_txt = "\n\n".join(
|
||||
{sentence["sentence"] for sentence in result.json()[0]["rf_highlights"]}
|
||||
)
|
||||
|
||||
daa_highlights = (
|
||||
f"{Style.BRIGHT}\n\tDISCUSSION AND ANALYSIS:{Style.RESET_ALL}\n"
|
||||
)
|
||||
daa_highlights += "\n\n".join(
|
||||
{
|
||||
sentence["sentence"]
|
||||
for sentence in result.json()[0]["daa_highlights"]
|
||||
}
|
||||
)
|
||||
|
||||
return (
|
||||
rf_highlights + rf_highlights_txt + "\n" + daa_highlights
|
||||
if rf_highlights_txt
|
||||
else daa_highlights
|
||||
)
|
||||
|
||||
return ""
|
||||
|
||||
BIN
images/gst_logo_green_white_background.png
vendored
Normal file
BIN
images/gst_logo_green_white_background.png
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 176 KiB |
Reference in New Issue
Block a user