From 04e625419ecc0b89f384a195cd547aeff8c93ed9 Mon Sep 17 00:00:00 2001 From: Anson Biggs Date: Mon, 10 Apr 2023 14:51:08 -0600 Subject: [PATCH] updated mkdocs version, replaced IEX with marketdata, and updated commands --- .gitignore | 1 + .gitlab-ci.yml | 19 ++---- .vscode/settings.json | 12 ++++ docs/commands.md | 151 +++++++----------------------------------- docs/donate.md | 6 +- docs/host.md | 12 ++-- docs/index.md | 8 +-- mkdocs.yml | 41 +++++++++--- requirements.txt | 8 ++- 9 files changed, 91 insertions(+), 167 deletions(-) create mode 100644 .gitignore create mode 100644 .vscode/settings.json diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..1998c29 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.cache \ No newline at end of file diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 40bff73..856bf11 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,18 +1,11 @@ -stages: - - docs - +image: python:3.11 pages: - stage: docs - image: python:3.9-buster - - before_script: - - pip install -r requirements.txt - + stage: deploy script: - - mkdocs build - - mv site public + - pip install mkdocs-material + - mkdocs build --site-dir public artifacts: paths: - public - only: - - master + rules: + - if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH' diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..d0231bf --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,12 @@ +{ + "yaml.schemas": { + "https://squidfunk.github.io/mkdocs-material/schema.json": "mkdocs.yml" + }, + "yaml.customTags": [ + "!ENV scalar", + "!ENV sequence", + "tag:yaml.org,2002:python/name:materialx.emoji.to_svg", + "tag:yaml.org,2002:python/name:materialx.emoji.twemoji", + "tag:yaml.org,2002:python/name:pymdownx.superfences.fence_code_format" + ] +} \ No newline at end of file diff --git a/docs/commands.md b/docs/commands.md index ed25941..6c6ee3b 100644 --- a/docs/commands.md +++ b/docs/commands.md @@ -41,48 +41,6 @@ The donate command is used to send money to the bot to help keep it free. The pr -## `/status` :robot: - -This command is to get diagnostic information about the bot and the services it is dependant on in order to operate. Any issues should be reported to me. [Contact](contact.md) - -
-
-
- /status -
-
-Bot Status: - It took 0.783369 seconds for the bot to get your message. - - Stock Market Data: - IEX Cloud is currently not reporting any issues with its API. - - Cryptocurrency Data: - CoinGecko API responded that it was OK in 0.160962 Seconds. -
-
- -
- -## `/dividend [symbol]` :bank: - -This command gives the rate and date of the dividend for a stock symbol. - -
-
-
- /dividend $psec -
-
-The next dividend for $PSEC: Prospect Capital Corp is on Thursday, August 4 which is in 44 days. The dividend is for $0.06 per share. -

-The dividend was declared on Monday, May 1 and the ex-dividend date is Tuesday, July 2 - -
-
- -
- ## `/intra [symbol]` :bank: :material-currency-btc: This command makes a chart of a stocks movement since the last market open, or the last 24 hours for cryptocurrency. @@ -121,90 +79,6 @@ This command makes a chart of the last 1 month of trading data up until the day -## `/news [symbol]` :bank: - -Gets the most recent, non paywalled, english news for a stock. If you have any suggestions for a cryptocurrency news source please [contact me.](contact.md) - -
-
-
- /news -
-
-News for TSLA:
-Top Tech News: Elon Musk admits self-driving is harder than he thought as Tesla owners troll him over missed deadlines
-Bitcoin Ethereum News: DOGE Price Analysis $0.231 | Cryptopolitan
-Tesla North: Bugatti to Merge with EV Hypercar Startup Rimac
-Tesla North: China-Made Tesla Model 3 Battery Drain Test After 14 Days of Sleep
-Tesmanian: Brandenburg Minister Supports Bureaucratic Reform & Hopes Tesla Giga Berlin Production Starts this Year
-        
-
-
- -## `/info [symbol]` :bank: :material-currency-btc: - -Gets a description of a company. Aimed to inform you on what a ticker is if you have no prior knowledge of it. - -
-
-
- /info $spce -
-
-Virgin Galactic Holdings, Inc. is a vertically integrated aerospace and space travel company, pioneering human spaceflight for private individuals and researchers, as well as a manufacturer of advanced air and space vehicles. It is developing a spaceflight system designed to offer customers a unique and transformative experience. -
-
-
- -## `/stat [symbol]` :bank: :material-currency-btc: - -Gets key market data of the symbol passed in. - -
-
-
- /stat $$ada -
-
-Cardano Statistics:
-    Market Cap: $0.0
-    Market Cap Ranking: None
-    CoinGecko Scores:
-        Overall: 8.928
-        Development: 0.0
-        Community: 12.066
-        Public Interest: 0.285
-        
-
- /stat $$ada -
-
-Company Name: Prospect Capital Corp
-Market Cap: $3,280,433,315
-52 Week (high-low): 9.19 - 4.21
-Number of Employees: 0
-Next Earnings Date: 2021-08-26
-Price to Earnings: 0.000
-Beta: 0.404
-        
-
-
- -## `/cap [symbol]` :material-currency-btc: :bank: :dollar: - -Gets the market capitalization of the symbol passed in. - -
-
-
- /cap $$sol -
-
-The current price of Solana is $37.91 and its market cap is $10,283,314,872.25 USD -
-
-
- ## `/trending` Gets the latest trending stocks and their change in price @@ -270,7 +144,30 @@ Just a simple command to get help in app. Returns a more summarized version of t -## Inline Features :fontawesome-brands-telegram-plane: :material-currency-btc: :bank: :dollar: +## `/status` :robot: + +This command is to get diagnostic information about the bot and the services it is dependant on in order to operate. Any issues should be reported to me. [Contact](contact.md) + +
+
+
+ /status +
+
+Bot Status:
+        It took 0.783369 seconds for the bot to get your message.
+
+        Stock Market Data:
+        marketdata.app is currently not reporting any issues with its API.
+
+        Cryptocurrency Data:
+        CoinGecko API responded that it was OK in 0.160962 Seconds.
+        
+
+ +
+ +## Inline Features :fontawesome-brands-telegram: :material-currency-btc: :bank: :dollar: You can type @SimpleStockBot `[search]` in any chat or direct message to search for the stock bots full list of stock symbols and return the price of the ticker. Then once you select the ticker diff --git a/docs/donate.md b/docs/donate.md index a3eb42c..f2e916c 100644 --- a/docs/donate.md +++ b/docs/donate.md @@ -1,4 +1,4 @@ -Simple Stock Bot is run entirely on donations, and costs about $420 a year to run. All donations go directly towards paying for servers, and premium market data provided by [IEX Cloud](https://iexcloud.io/). +Simple Stock Bot is run entirely on donations, and costs about $420 a year to run. All donations go directly towards paying for servers, and premium market data provided by [matketdata.app](https://dashboard.marketdata.app/marketdata/aff/go/misterbiggs?keyword=repo). The best way to donate is through [Buy Me A Coffee](https://www.buymeacoffee.com/Anson) which accepts Paypal or Credit card. @@ -11,5 +11,5 @@ If you have any questions get in [touch.](contact.md) - Follow me on [twitter](https://twitter.com/AnsonBiggs) - Contribute to the project on [GitLab](https://gitlab.com/simple-stock-bots) or just leave a star - Using my referral links to host your own Bot - - [DigitalOcean](https://m.do.co/c/6b5df7ef55b6) - - [IEX Cloud](https://iexcloud.io/s/62c8503e) \ No newline at end of file + - [matketdata.app](https://dashboard.marketdata.app/marketdata/aff/go/misterbiggs?keyword=repo) + - [DigitalOcean](https://m.do.co/c/6b5df7ef55b6) \ No newline at end of file diff --git a/docs/host.md b/docs/host.md index dea71e4..ea51dbf 100644 --- a/docs/host.md +++ b/docs/host.md @@ -11,17 +11,17 @@ Depending on what platform you'll need: - Telegram API key which can be obtained for free by talking to [BotFather](https://telegram.me/botfather), more details [here.](https://core.telegram.org/bots#3-how-do-i-create-a-bot) - Discord API key which can be obtained for free at [https://discord.com/developers](https://discord.com/developers) -Finally, you will need and IEX Cloud API key. They offer a free tier that should be enough for any private groups, more details [here.](https://iexcloud.io/) +Finally, you will need a [matketdata.app](https://dashboard.marketdata.app/marketdata/aff/go/misterbiggs?keyword=repo) API key. They offer a free tier that should be enough for any private groups, more details [here.](https://dashboard.marketdata.app/marketdata/aff/go/misterbiggs?keyword=repo) !!! tip - The bot will function without an IEX key and will fall back to only using cryptocurrency data. + The bot will function without a [matketdata.app](https://dashboard.marketdata.app/marketdata/aff/go/misterbiggs?keyword=repo) key and will fall back to only using cryptocurrency data. !!! note - If you want to accept donations you also need a Stripe API key. [https://stripe.com/] + If you want to accept donations you also need a Stripe API key and provide a `STRIPE` key to your bot. [https://stripe.com/] ## Installing -Once Docker is installed and you have your API keys for Telegram and IEX Cloud getting the bot running on any platform is extremely easy. +Once Docker is installed and you have your API keys for Telegram and [matketdata.app](https://dashboard.marketdata.app/marketdata/aff/go/misterbiggs?keyword=repo) getting the bot running on any platform is extremely easy. Download or clone the repository to your machine and open a terminal in the project and build the Docker container. @@ -33,8 +33,8 @@ Then run the bot using your API keys. ``` docker run --detach \ - -e TELEGRAM=TELEGRAM_API \ - -e IEX=IEX_API \ + -e TELEGRAM=TELEGRAM_API_KEY \ + -e MARKETDATA=MARKETDATA_API_KEY \ simple-telegram-bot ``` diff --git a/docs/index.md b/docs/index.md index 33a40a8..36bb32a 100644 --- a/docs/index.md +++ b/docs/index.md @@ -6,12 +6,10 @@ Simple Stock Bots is a family of messaging bots that aim to provide simple inter The bots can either be added to a server or can be direct messaged for the exact same functionality. Links for each platform are below: -[Telegram Bot :fontawesome-brands-telegram-plane:](https://t.me/SimpleStockBot){ .md-button .md-button--primary } +[Telegram Bot :fontawesome-brands-telegram:](https://t.me/SimpleStockBot){ .md-button .md-button--primary } [Discord Bot :fontawesome-brands-discord:](https://discordapp.com/api/oauth2/authorize?client_id=532045200823025666&permissions=36507338752&scope=bot){ .md-button .md-button--primary } - - Alternatively, this project is completely open source and instructions on how to run your own instance of the bot are provided on each of the bots pages. [Hosting](host.md) ## Usage @@ -25,7 +23,7 @@ The source code for the bots is completely open and hosted on GitLab. The projec - [Telegram Bot Source](https://gitlab.com/simple-stock-bots/simple-telegram-stock-bot) - [Discord Bot Source](https://gitlab.com/simple-stock-bots/simple-discord-stock-bot) -If you decide to host your own bots using my source code please consider using my referral links for DigitalOcean and IEX Cloud. We both get a kickback when you use them. +If you decide to host your own bots using my source code please consider using my referral links for marketdata.app and DigitalOcean. We both get a kickback when you use them. - [DigitalOcean](https://m.do.co/c/6b5df7ef55b6) -- [IEX Cloud](https://iexcloud.io/s/62c8503e) +- [matketdata.app](https://dashboard.marketdata.app/marketdata/aff/go/misterbiggs?keyword=repo) diff --git a/mkdocs.yml b/mkdocs.yml index c5b22a6..f7bd2d7 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -6,7 +6,7 @@ repo_name: Simple Stock Bots site_description: Simple Discord and Telegram chat bots for Stock Market Data. site_author: Anson Biggs -copyright: Anson Biggs 2018
Available Under an MIT LICENSE
All market data is provided by IEX Cloud +copyright: Anson Biggs 2018
Available Under an MIT LICENSE
nav: @@ -17,9 +17,14 @@ nav: - Contact: contact.md theme: - name: "material" + name: material + language: en features: + - navigation.instant + - navigation.tracking - navigation.tabs + - navigation.tabs.sticky + - navigation.footer icon: logo: material/robot-love palette: @@ -36,18 +41,34 @@ theme: icon: material/lightbulb name: Switch to light mode +extra: + social: + - icon: fontawesome/solid/house + link: https://simplestockbot.com/ + - icon: fontawesome/brands/telegram + link: https://t.me/SimpleStockBot + name: Get the Telegram bot + - icon: fontawesome/brands/discord + link: https://discordapp.com/api/oauth2/authorize?client_id=532045200823025666&permissions=36507338752&scope=bot + name: Get the Discord Bot + - icon: material/chart-line-stacked + link: https://dashboard.marketdata.app/marketdata/aff/go/misterbiggs?keyword=repo + name: MarketData.app for stock data + + + extra_css: - stylesheets/phone.css -markdown_extensions: - - admonition - - toc: - permalink: true - - pymdownx.emoji: - emoji_index: !!python/name:materialx.emoji.twemoji - emoji_generator: !!python/name:materialx.emoji.to_svg - - attr_list plugins: - search + - social + + +markdown_extensions: +- attr_list +- pymdownx.emoji: + emoji_index: !!python/name:materialx.emoji.twemoji + emoji_generator: !!python/name:materialx.emoji.to_svg diff --git a/requirements.txt b/requirements.txt index 6473f56..8557b03 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,5 @@ -mkdocs==1.2.3 -mkdocs-material==7.3.6 -mkdocs-material-extensions==1.0.3 +mkdocs-material==9.1 + +# Required for Social Cards +Pillow==9.5.0 +CairoSVG==2.7.0 \ No newline at end of file