43 Commits

Author SHA1 Message Date
0822e309db Merge pull request 'Fixed footers' (#4) from wip into main
Reviewed-on: #4
2025-03-28 19:26:55 +01:00
85827eddc5 Fixed footers 2025-03-28 18:26:14 +00:00
a6a62e84d3 Merge pull request 'Nouveau footer - changement de nom des images' (#3) from wip into main
Reviewed-on: #3
2025-03-28 19:22:54 +01:00
06eef00c79 Nouveau footer - changement de nom des images 2025-03-28 18:20:37 +00:00
6d4a160416 New logo - dark 2025-03-28 16:10:40 +00:00
7894b03883 Fixed schematics definition 2025-03-28 15:26:25 +00:00
c787c61332 Merge branch 'wip' 2025-03-28 15:24:24 +00:00
d6b5273e5a Fixed list 2025-03-28 15:23:55 +00:00
10ab4f6fc0 Merge branch 'wip' 2025-03-28 15:21:02 +00:00
f133344f7a fixed schematics 2025-03-28 15:20:50 +00:00
d1609d0776 Contributeurs 2025-03-28 15:05:18 +00:00
bf5fa6203b Merge branch 'wip' 2025-03-28 14:37:12 +00:00
aae087c91b New pp 2025-03-28 14:36:48 +00:00
b69b45a03f Merge branch 'wip' 2025-03-28 13:36:33 +00:00
5503fbf275 fixed logo 2025-03-28 13:35:56 +00:00
2b192247bb Merge pull request 'Nouvelle pp + section capture' (#2) from wip into main
Reviewed-on: #2
2025-03-28 10:16:27 +01:00
e1e3502be2 Nouvelle pp + section capture 2025-03-28 09:12:55 +00:00
e585f18a93 Merge branch 'wip' 2025-03-27 22:18:18 +00:00
fc6ae91c55 Minor changes 2025-03-27 22:17:30 +00:00
a496a1b1bf Merge branch 'wip' 2025-03-27 22:09:03 +00:00
1722f276a9 Logo 2025-03-27 22:07:26 +00:00
38b60300c4 Logo 2025-03-27 22:05:59 +00:00
6a6336a07c Merge pull request 'wip - Fusion refonte README.md & LICENSE' (#1) from wip into main
Reviewed-on: #1
2025-03-27 21:01:19 +01:00
ef27e320e2 Refonte README + License 2025-03-27 19:57:30 +00:00
16e80db82f Merge branch 'wip' of https://git.djeex.fr/Djeex/nvidia-stock-bot into wip 2025-03-27 18:31:07 +00:00
3dd9dd5946 Minor changes 2025-03-27 18:30:07 +00:00
9dd3d76d7f Disclaimer IA 2025-03-27 18:29:49 +00:00
45b6bed116 Minor changes 2025-03-27 18:27:03 +00:00
24cad015bc Minor changes 2025-03-27 18:25:55 +00:00
b0309f34fe Disclaimer IA 2025-03-27 18:23:53 +00:00
841ffb5efe Minor changes 2025-03-27 10:59:14 +00:00
d4e34f20ec Minor changes 2025-03-27 10:39:43 +00:00
ddfbe853e9 fix png -> jpg 2025-03-27 10:19:06 +00:00
4115825953 illustration discord 2025-03-27 10:18:18 +00:00
dfa3a5e19c In english 2025-03-26 15:38:46 +00:00
cdbb1be864 Minor change 2025-03-26 12:01:31 +00:00
3ed38e7aa3 badge license 2025-03-26 12:01:12 +00:00
c392efce35 Ajout license 2025-03-26 11:55:09 +00:00
2761a9dacb License 2025-03-26 11:53:23 +00:00
006531aacc Maj intro 2025-03-14 15:12:40 +00:00
a8d4c05c81 Fix python section 2025-03-14 15:08:30 +00:00
280e8d0347 Maj schema 2025-03-14 15:05:06 +00:00
53c46b1d2f WIP to MAIN 2025-03-14 12:02:54 +00:00
10 changed files with 146 additions and 71 deletions

24
LICENSE Normal file
View File

@ -0,0 +1,24 @@
Creative Commons Attribution-NonCommercial 4.0 International License (CC BY-NC 4.0)
Copyright (c) 2025 Djeex
This work is licensed under the Creative Commons Attribution-NonCommercial 4.0 International License.
You are free to:
Share — copy, distribute, and transmit the material in any medium or format
Adapt — remix, transform, and build upon the material
Under the following terms:
Attribution — You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
NonCommercial — You may not use the material for commercial purposes.
No additional restrictions — You may not apply legal terms or technological measures that legally restrict others from doing anything the license permits.
You can review the full license here:
https://creativecommons.org/licenses/by-nc/4.0/
DISCLAIMER: This text does not constitute legal advice. For any legal questions, please consult a professional.

167
README.md
View File

@ -1,100 +1,131 @@
# Nvidia Stock Bot - WIP
Par KevOut & Djeex
<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">
<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>
[![](https://img.shields.io/badge/JV%20hardware-rejoindre-green?style=flat-square&logo=discord&logoColor=%23fff&label=JV%20hardware&link=https%3A%2F%2Fdiscord.gg%2Fgxffg3GA96)](https://discord.gg/gxffg3GA96)
</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.
Ce robot :
- Appelle l'API de Nvidia listant le produit (par défaut toutes les 60s)
- Récupère le SKU du produit concerné
- Appelle le stock lié à ce SKU
- Si du stock est trouvé, envoie une notification discord via le webhook paramétré
- Si le produit était déjà en stock, il n'envoie plus de notification
- Si le produit était en stock mais ne l'est plus, envoie une notification discord signifiant la fin du stock
- Si le SKU change, une notification est envoyée alertant de l'éventuelle imminence du drop
*Le code a été en partie rédigé et structuré à l'aide d'une IA générative.*
<img src="https://git.djeex.fr/Djeex/nvidia-stock-bot/raw/branch/main/assets/img/nvbot.png" align="center">
## Sommaire
Trois modes d'installation :
- [Avec le dépot Git et Docker](https://git.djeex.fr/Djeex/nvidia-stock-bot/#installation-avec-le-d%C3%A9pot)
- [Sans le dépot Git et avec notre image docker fournie](https://git.djeex.fr/Djeex/nvidia-stock-bot/#installation-sans-le-d%C3%A9pot-avec-docker-compose)
- [Avec python (développeurs)](https://git.djeex.fr/Djeex/nvidia-stock-bot/#installation-sans-le-d%C3%A9pot-avec-docker-compose)
- [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)
## Installation avec le dépot
## Fonctionnalités
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.
- 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
### Pré-requis
- Git
- Docker
### Cloner et paramétrer
Clonez le 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 :
```sh
docker build -t nvidia-stock-bot .
```
Rendez-vous dans le dossier `nvidia-stock-bot/docker` et éditez le fichier `.env` avec :
- l'url de votre webhook discord
- 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)
### Lancer l'image
Rendez-vous dans le dossier `nvidia-stock-bot/docker` et lancez le conteneur :
```sh
docker compose up -d
```
### Voir les logs pour vérifier le bon fonctionnement
```sh
docker logs -f nvidia-stock-bot
```
<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
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.
### Pré-requis
- Docker
**Pré-requis**
- [Docker](https://docs.docker.com/engine/install/)
### Configuration
**Configuration**
- Créez un dossier `nvidia-stock-bot`
- Créez le fichier `compose.yaml` dans ce dossier avec la configuration ci-dessous :
```yaml
version: "3.8"
services:
nvidia-stock-bot:
image: git.djeex.fr/djeex/nvidia-stock-bot:wip
image: git.djeex.fr/djeex/nvidia-stock-bot:latest
container_name: nvidia-stock-bot
restart: always # Le conteneur redémarrera automatiquement en cas d'échec
restart: always
environment:
- DISCORD_WEBHOOK_URL= # URL de votre webhook Discord
- REFRESH_TIME= # Durée de rafraichissement du script en secondes
- API_URL_SKU= # API listant le produit par exemple https://api.nvidia.partners/edge/product/search?page=1&limit=100&locale=fr-fr&Manufacturer=Nvidia&gpu=RTX%205090
- API_URL_STOCK= # API appelant le stock sans préciser la valeur du sku, par exemple https://api.store.nvidia.com/partner/v1/feinventory?locale=fr-fr&skus=
- PRODUCT_URL= # URL d'achat du GPU
- PRODUCT_NAME= #Le nom du GPU qui s'affiche dans les notifications
- TEST_MODE= #true pour tester les notifications discord. false par défaut.
- PRODUCT_NAME= # Le nom du GPU qui s'affiche dans les notifications
- TEST_MODE= # true pour tester les notifications discord. false par défaut.
- PYTHONUNBUFFERED=1 # Permet d'afficher les logs en temps réel
command: python nvidia-stock-bot.py # Lance le script Python au démarrage du conteneur
```
**Lancer l'image**
Rendez-vous dans le dossier `nvidia-stock-bot` et lancez le conteneur :
```sh
docker compose up -d
```
**Voir les logs pour vérifier le bon fonctionnement**
```sh
docker logs -f nvidia-stock-bot
```
## Installation avec le dépot
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.
**Pré-requis**
- [Git](https://git-scm.com/docs)
- [Docker](https://docs.docker.com/engine/install/)
**Cloner et paramétrer**
- Clonez le 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 :
```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)
**Lancer l'image**
Rendez-vous dans le dossier `nvidia-stock-bot/docker` et lancez le conteneur :
```sh
docker compose up -d
```
**Voir les logs pour vérifier le bon fonctionnement**
```sh
docker logs -f nvidia-stock-bot
```
## Installation avec Python
Vous trouverez ci-dessous comment exécuter directement le script Python. Avec cette solution, le bot s'arretera si vous fermez votre terminal.
### Pré-requis
**Pré-requis**
- Python 3.11 ou plus
- requests : `pip install requests`
### Configuration
**Configuration**
- Créez un environnement virtuel (exemple : `python3 -m venv nom_de_l_environnement` )
- Créez un dossier et aller dedans
@ -108,8 +139,10 @@ Vous trouverez ci-dessous comment exécuter directement le script Python. Avec c
```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%205090"
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
@ -117,3 +150,17 @@ Vous trouverez ci-dessous comment exécuter directement le script Python. Avec c
```sh
python nvidia-stock-bot.py
```
## Captures d'écran
<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">
</div>
## Contributeurs
On remercie pour leurs contributions :
- Djeex
- KevOut
- Extreme2pac

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

BIN
assets/img/ds_wh_pp.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.3 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 499 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 170 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

View File

@ -120,10 +120,11 @@ def send_discord_notification(gpu_name: str, product_link: str, products_price:
],
"description": f"**:point_right: [Acheter maintenant]({product_link})**",
"footer": {
"text": "Par KevOut & Djeex"
"text": "NviBot • JV Hardware 2.0",
"icon_url": "https://git.djeex.fr/Djeex/nvidia-stock-bot/raw/branch/main/assets/img/ds_wh_pp.jpg"
}
}
payload = {"content": "@everyone", "username": "NviBot", "avatar_url": "https://git.djeex.fr/Djeex/nvidia-stock-bot/raw/branch/main/assets/img/RTX5000_pp.jpg", "embeds": [embed]}
payload = {"content": "@everyone", "username": "NviBot", "avatar_url": "https://git.djeex.fr/Djeex/nvidia-stock-bot/raw/branch/main/assets/img/ds_wh_pp.jpg", "embeds": [embed]}
try:
response = requests.post(DISCORD_WEBHOOK_URL, json=payload)
if response.status_code == 204:
@ -152,8 +153,10 @@ def send_out_of_stock_notification(gpu_name: str, product_link: str, products_pr
"author": {
"name": "Nvidia Founder Editions"
},
"footer": {
"text": "Par KevOut & Djeex"
"text": "NviBot • JV Hardware 2.0",
"icon_url": "https://git.djeex.fr/Djeex/nvidia-stock-bot/raw/branch/main/assets/img/ds_wh_pp.jpg"
},
"fields": [
@ -164,7 +167,7 @@ def send_out_of_stock_notification(gpu_name: str, product_link: str, products_pr
}
]
}
payload = {"username": "NviBot", "avatar_url": "https://git.djeex.fr/Djeex/nvidia-stock-bot/raw/branch/main/assets/img/RTX5000_pp.jpg", "embeds": [embed]}
payload = {"username": "NviBot", "avatar_url": "https://git.djeex.fr/Djeex/nvidia-stock-bot/raw/branch/main/assets/img/ds_wh_pp.jpg", "embeds": [embed]}
try:
response = requests.post(DISCORD_WEBHOOK_URL, json=payload)
if response.status_code == 204:
@ -190,7 +193,8 @@ def send_sku_change_notification(old_sku: str, new_sku: str, product_link: str):
"color": 16776960, # Jaune
"footer": {
"text": "Par KevOut & Djeex"
"text": "NviBot • JV Hardware 2.0",
"icon_url": "https://git.djeex.fr/Djeex/nvidia-stock-bot/raw/branch/main/assets/img/ds_wh_pp.jpg"
},
"fields": [
@ -205,7 +209,7 @@ def send_sku_change_notification(old_sku: str, new_sku: str, product_link: str):
payload = {
"content": "@everyone ⚠️ Potentiel drop imminent !",
"username": "NviBot",
"avatar_url": "https://git.djeex.fr/Djeex/nvidia-stock-bot/raw/branch/main/assets/img/RTX5000_pp.jpg",
"avatar_url": "https://git.djeex.fr/Djeex/nvidia-stock-bot/raw/branch/main/assets/img/ds_wh_pp.jpg",
"embeds": [embed]
}