In english please
This commit is contained in:
parent
27966c04e5
commit
8124ad6a2d
171
README.md
171
README.md
@ -1,50 +1,49 @@
|
||||
<h1 align="center">Nvidia Stock Bot</h1>
|
||||
<div align="center">
|
||||
<a href="https://discord.gg/gxffg3GA96">
|
||||
<img src="https://img.shields.io/badge/JV%20hardware-rejoindre-green?style=flat-square&logo=discord&logoColor=%23fff" alt="JV Hardware">
|
||||
<img src="https://img.shields.io/badge/JV%20hardware-join-green?style=flat-square&logo=discord&logoColor=%23fff" alt="JV Hardware">
|
||||
<a href="https://creativecommons.org/licenses/by-nc/4.0/" target="_blank">
|
||||
<img src="https://img.shields.io/badge/License-CC%20BY--NC%204.0-8E44AD?style=flat-square" alt="License: CC BY-NC 4.0">
|
||||
</a>
|
||||
|
||||
</div>
|
||||
<div align="center" >
|
||||
<img src="https://git.djeex.fr/Djeex/nvidia-stock-bot/raw/branch/main/assets/img/nvidia-stock-bot-logo.png" alt="Nvidia Stock Bot" width="300">
|
||||
</div>
|
||||
|
||||
**🤖 Nvidia Stock Bot** - Un robot qui permet d'être alerté en temps réel des stocks de cartes graphiques **Nvidia RTX FE** grâce à des notifications Discord.
|
||||
**🤖 Nvidia Stock Bot** - A bot that alerts you in real-time about **Nvidia RTX FE** GPU stock availability through Discord notifications.
|
||||
|
||||
*Le code a été en partie rédigé et structuré à l'aide d'une IA générative.*
|
||||
*The code was partially written and structured using a generative AI.*
|
||||
|
||||
## 📌 Sommaire
|
||||
## 📌 Table of Contents
|
||||
|
||||
- [✨ Fonctionnalités](#fonctionnalit%C3%A9s)
|
||||
- [🐳 Installation docker sans le dépot (rapide)](#installation-sans-le-d%C3%A9pot-avec-docker-compose)
|
||||
- [🐙 Installation docker avec le dépot (développeur)](#installation-avec-le-d%C3%A9pot)
|
||||
- [🐍 Installation avec Python (développeur)](#installation-avec-python)
|
||||
- [🖼️ Captures d'écran](#captures-d%C3%A9cran)
|
||||
- [🧑💻 Contributeurs](#contributeurs)
|
||||
- [✨ Features](#features)
|
||||
- [🐳 Docker Installation without cloning the repo (quick)](#docker-installation-without-the-repo-quick)
|
||||
- [🐙 Docker Installation with the repo (developer)](#docker-installation-with-the-repo)
|
||||
- [🐍 Python Installation (developer)](#python-installation)
|
||||
- [🖼️ Screenshots](#screenshots)
|
||||
- [🧑💻 Contributors](#contributors)
|
||||
|
||||
## ✨ Fonctionnalités
|
||||
## ✨ Features
|
||||
|
||||
- Notification Discord `@everyone` en cas de changement du SKU (potentiel drop imminent)
|
||||
- Notification Discord `@everyone` en cas de stock détecté avec modèle, prix, et lien
|
||||
- Notification Discord silencieuse en cas d'absence de stock détécté
|
||||
- Choix de la fréquence de la vérification
|
||||
- Choix du modèle à surveiller
|
||||
- Discord `@everyone` notification on SKU change (possible imminent drop)
|
||||
- Discord `@everyone` notification when stock is detected, including model, price, and link
|
||||
- Silent Discord notification when no stock is detected
|
||||
- Selectable check frequency
|
||||
- Selectable GPU model
|
||||
|
||||
<img src="https://git.djeex.fr/Djeex/nvidia-stock-bot/raw/branch/main/assets/img/nvbot_schematics.png" align="center">
|
||||
|
||||
## 🐳 Installation sans le dépot avec docker compose
|
||||
## 🐳 Docker Installation without the repo (quick)
|
||||
|
||||
Vous trouverez-ci dessous les instructions pour configurer le conteneur avec notre image pré-compilée. Avec cette solution, votre bot tournera tout seul tant que le conteneur est actif.
|
||||
Below are the instructions to set up the container using our pre-built image. With this setup, your bot will run independently as long as the container is active.
|
||||
|
||||
**Pré-requis**
|
||||
**Requirements**
|
||||
- [Docker](https://docs.docker.com/engine/install/)
|
||||
|
||||
**Configuration**
|
||||
|
||||
- Créez un dossier `nvidia-stock-bot`
|
||||
- Créez le fichier `compose.yaml` dans ce dossier avec la configuration ci-dessous :
|
||||
- Create a folder named `nvidia-stock-bot`
|
||||
- Create a `compose.yaml` file inside that folder with the following content:
|
||||
|
||||
```yaml
|
||||
services:
|
||||
@ -53,120 +52,122 @@ services:
|
||||
container_name: nvidia-stock-bot
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
- DISCORD_WEBHOOK_URL= # URL de votre webhook Discord
|
||||
- PRODUCT_NAME= # Le nom exact du GPU que vous recherchez comme "RTX 5080"
|
||||
- PYTHONUNBUFFERED=1 # Permet d'afficher les logs en temps réel
|
||||
- DISCORD_WEBHOOK_URL= # Your Discord webhook URL
|
||||
- PRODUCT_NAME= # Exact GPU name like "RTX 5080"
|
||||
- PYTHONUNBUFFERED=1 # Enables real-time log output
|
||||
command: python nvidia-stock-bot.py
|
||||
```
|
||||
|
||||
**Variables d'environnements :**
|
||||
**Environment Variables:**
|
||||
|
||||
| Variables | Explications | Valeurs possibles | Valeur par défaut |
|
||||
|---------------------|-------------------------------------------------|--------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------|
|
||||
| DISCORD_WEBHOOK_URL | URL de votre webhook Discord | Une URL | |
|
||||
| REFRESH_TIME | Durée de rafraichissement du script en secondes | `60`, `30`, etc... | `30` |
|
||||
| API_URL_SKU | API listant le produit | Une URL | `https://api.nvidia.partners/edge/product/search?page=1&limit=100&locale=fr-fr&Manufacturer=Nvidia` |
|
||||
| API_URL_STOCK | API donnant le stock | Une URL | `https://api.store.nvidia.com/partner/v1/feinventory?locale=fr-fr&skus=` |
|
||||
| PRODUCT_URL | URL d'achat du GPU | Une URL | `https://marketplace.nvidia.com/fr-fr/consumer/graphics-cards/?locale=fr-fr&page=1&limit=12&manufacturer=NVIDIA` |
|
||||
| PRODUCT_NAME | Le nom exact du GPU que vous recherchez | `RTX 5090`, `RTX 5080` ou `RTX 5070`. | |
|
||||
| TEST_MODE | Pour tester sans envoyer de notifs | `True`, `False` | `False` |
|
||||
| PYTHONUNBUFFERED | #Permet d'afficher les logs en temps réel | `1`, `0` | `1` |
|
||||
| Variable | Description | Possible Values | Default Value |
|
||||
|---------------------|-------------------------------------------------|------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------|
|
||||
| DISCORD_WEBHOOK_URL | Your Discord webhook URL | A valid URL | |
|
||||
| REFRESH_TIME | Script refresh interval in seconds | `60`, `30`, etc. | `30` |
|
||||
| API_URL_SKU | API listing the product | A URL | `https://api.nvidia.partners/edge/product/search?page=1&limit=100&locale=fr-fr&Manufacturer=Nvidia` |
|
||||
| API_URL_STOCK | API providing stock data | A URL | `https://api.store.nvidia.com/partner/v1/feinventory?locale=fr-fr&skus=` |
|
||||
| PRODUCT_URL | GPU purchase URL | A URL | `https://marketplace.nvidia.com/fr-fr/consumer/graphics-cards/?locale=fr-fr&page=1&limit=12&manufacturer=NVIDIA` |
|
||||
| PRODUCT_NAME | The exact GPU name you're searching for | `RTX 5090`, `RTX 5080`, `RTX 5070` | |
|
||||
| TEST_MODE | For testing without sending notifications | `True`, `False` | `False` |
|
||||
| PYTHONUNBUFFERED | Enables real-time log output | `1`, `0` | `1` |
|
||||
|
||||
**Lancer l'image**
|
||||
**Run the image**
|
||||
|
||||
Rendez-vous dans le dossier `nvidia-stock-bot` et lancez le conteneur :
|
||||
Navigate to the `nvidia-stock-bot` folder and launch the container:
|
||||
```sh
|
||||
docker compose up -d
|
||||
```
|
||||
|
||||
**Voir les logs pour vérifier le bon fonctionnement**
|
||||
**Check logs to verify operation**
|
||||
|
||||
```sh
|
||||
docker logs -f nvidia-stock-bot
|
||||
```
|
||||
|
||||
## 📦 Installation avec le dépot
|
||||
## 📦 Docker Installation with the repo
|
||||
|
||||
Vous trouverez-ci dessous les instructions pour installer le dépot, compiler l'image docker, et lancer le conteneur. Avec cette solution, votre bot tournera tout seul tant que le conteneur est actif.
|
||||
Instructions below show how to install the repo, build the Docker image, and launch the container. Your bot will run independently as long as the container is active.
|
||||
|
||||
**Pré-requis**
|
||||
**Requirements**
|
||||
- [Git](https://git-scm.com/docs)
|
||||
- [Docker](https://docs.docker.com/engine/install/)
|
||||
|
||||
**Cloner et paramétrer**
|
||||
**Clone and configure**
|
||||
|
||||
- Clonez le repo :
|
||||
- Clone the repo:
|
||||
```sh
|
||||
git clone https://git.djeex.fr/Djeex/nvidia-stock-bot.git
|
||||
```
|
||||
|
||||
- Rendez vous dans le dossier `nvidia-stock-bot` et compilez l'image docker :
|
||||
- Navigate to `nvidia-stock-bot` and build the Docker image:
|
||||
```sh
|
||||
docker build -t nvidia-stock-bot .
|
||||
```
|
||||
|
||||
- Puis rendez-vous dans le dossier `nvidia-stock-bot/docker` et éditez le fichier `.env` avec :
|
||||
- l'url de votre webhook discord
|
||||
- les différents liens API et produits
|
||||
- la fréquence de consultation des stock (par défaut 60s, attention à ne pas trop descendre sous peine de blocage de votre adresse IP par nVidia)
|
||||
- Then go to `nvidia-stock-bot/docker` and edit the `.env` file with:
|
||||
- Your Discord webhook URL
|
||||
- The API and product URLs
|
||||
- Stock checking frequency (default: 60s; lowering too much may get your IP blocked by Nvidia)
|
||||
|
||||
**Lancer l'image**
|
||||
**Run the image**
|
||||
|
||||
Rendez-vous dans le dossier `nvidia-stock-bot/docker` et lancez le conteneur :
|
||||
Navigate to `nvidia-stock-bot/docker` and launch the container:
|
||||
```sh
|
||||
docker compose up -d
|
||||
```
|
||||
|
||||
**Voir les logs pour vérifier le bon fonctionnement**
|
||||
**Check logs to verify operation**
|
||||
|
||||
```sh
|
||||
docker logs -f nvidia-stock-bot
|
||||
```
|
||||
|
||||
## 🐍 Installation avec Python
|
||||
## 🐍 Python Installation
|
||||
|
||||
Vous trouverez ci-dessous comment exécuter directement le script Python. Avec cette solution, le bot s'arretera si vous fermez votre terminal.
|
||||
Instructions to directly run the Python script. Note: the bot stops when you close the terminal.
|
||||
|
||||
**Pré-requis**
|
||||
**Requirements**
|
||||
|
||||
- Python 3.11 ou plus
|
||||
- requests : `pip install requests`
|
||||
- Python 3.11 or newer
|
||||
- requests: `pip install requests`
|
||||
|
||||
**Configuration**
|
||||
|
||||
- Créez un environnement virtuel (exemple : `python3 -m venv nom_de_l_environnement` )
|
||||
- Créez un dossier et aller dedans
|
||||
- Téléchargez le script python :
|
||||
|
||||
```sh
|
||||
curl -o nvidia-stock-bot.py -# https://git.djeex.fr/Djeex/nvidia-stock-bot/raw/branch/main/nvidia-stock-bot.py
|
||||
```
|
||||
- Exportez les variables d'environnement avec votre webhook discord et le temps de rafraichissement en secondes, par exemple :
|
||||
|
||||
```sh
|
||||
export DISCORD_WEBHOOK_URL="https://votre_url_discord"
|
||||
export REFRESH_TIME="60"
|
||||
export API_URL_SKU="https://api.nvidia.partners/edge/product/search?page=1&limit=100&locale=fr-fr&Manufacturer=Nvidia&gpu=RTX%205080"
|
||||
export API_URL_STOCK="https://api.store.nvidia.com/partner/v1/feinventory?locale=fr-fr&skus="
|
||||
export PRODUCT_URL= "https://marketplace.nvidia.com/fr-fr/consumer/graphics-cards/?locale=fr-fr&page=1&limit=12&gpu=RTX%205080&manufacturer=NVIDIA"
|
||||
export PRODUCT_NAME="RTX 5080"
|
||||
export TEST_MODE=false
|
||||
```
|
||||
- Lancez le script
|
||||
|
||||
```sh
|
||||
python nvidia-stock-bot.py
|
||||
```
|
||||
- Create a virtual environment (e.g., `python3 -m venv env_name`)
|
||||
- Create and navigate into a folder
|
||||
- Download the Python script:
|
||||
|
||||
## 🖼️ Captures d'écran
|
||||
```sh
|
||||
curl -o nvidia-stock-bot.py -# https://git.djeex.fr/Djeex/nvidia-stock-bot/raw/branch/main/nvidia-stock-bot.py
|
||||
```
|
||||
|
||||
<div align="center" >
|
||||
<img src="https://git.djeex.fr/Djeex/nvidia-stock-bot/raw/branch/main/assets/img/nvidia-stock-bot-discord.png" alt="Nvidia Stock Bot - captures">
|
||||
- Export the environment variables with your webhook and refresh time:
|
||||
|
||||
```sh
|
||||
export DISCORD_WEBHOOK_URL="https://your_discord_url"
|
||||
export REFRESH_TIME="60"
|
||||
export API_URL_SKU="https://api.nvidia.partners/edge/product/search?page=1&limit=100&locale=fr-fr&Manufacturer=Nvidia&gpu=RTX%205080"
|
||||
export API_URL_STOCK="https://api.store.nvidia.com/partner/v1/feinventory?locale=fr-fr&skus="
|
||||
export PRODUCT_URL="https://marketplace.nvidia.com/fr-fr/consumer/graphics-cards/?locale=fr-fr&page=1&limit=12&gpu=RTX%205080&manufacturer=NVIDIA"
|
||||
export PRODUCT_NAME="RTX 5080"
|
||||
export TEST_MODE=false
|
||||
```
|
||||
|
||||
- Run the script
|
||||
|
||||
```sh
|
||||
python nvidia-stock-bot.py
|
||||
```
|
||||
|
||||
## 🖼️ Screenshots
|
||||
|
||||
<div align="center" >
|
||||
<img src="https://git.djeex.fr/Djeex/nvidia-stock-bot/raw/branch/main/assets/img/nvidia-stock-bot-discord.png" alt="Nvidia Stock Bot - screenshots">
|
||||
</div>
|
||||
|
||||
## 🧑💻 Contributeurs
|
||||
## 🧑💻 Contributors
|
||||
|
||||
On remercie pour leurs contributions :
|
||||
Thanks for their contributions:
|
||||
|
||||
- Djeex
|
||||
- KevOut
|
||||
|
Loading…
x
Reference in New Issue
Block a user