New COUNTRY variable. It sets notifications language, currency, and API localization. Removed DISCORD_NOTIFICATION_CURRENCY and DISCORD_NOTIFICATION_LANGUAGE

This commit is contained in:
2025-07-12 17:36:58 +00:00
parent c5a280d911
commit 4cd15d9bcc
6 changed files with 424 additions and 291 deletions

View File

@ -28,12 +28,13 @@
## ✨ Features
- Selectable GPU models
- Selectable country marketplace to check. It will set notifications language and currency accordingly
- Discord `@everyone` or specified role on SKU change (possible imminent drop)
- Discord `@everyone` or specified role notification when stock is detected, including model, price, and link
- Silent Discord notification when no stock is detected
- Selectable notification language
- Selectable notification server name in footer
- Selectable notification server name in notification footer
- Selectable check frequency
- Test mode to check without sending notifications
## 🐳 Docker Installation without the repo (quick)
@ -55,12 +56,9 @@ services:
restart: unless-stopped
environment:
# Minimal environment variables
- PRODUCT_NAMES= # Exact GPU name (e.g. "RTX 5080, RTX 5090")
- PRODUCT_NAMES= # Exact GPU name (e.g. 'RTX 5080, RTX 5090')
- DISCORD_WEBHOOK_URL= # Your Discord webhook URL
- DISCORD_NOTIFICATION_CURRENCY= # Set your country currency
- API_URL_SKU= # API listing the product for your country
- API_URL_STOCK= # API providing stock data for your country
- PRODUCT_URL= # GPU purchase URL for your country
- COUNTRY= # Set your country (e.g. 'US')
- PYTHONUNBUFFERED=1 # Enables real-time log output
```
@ -70,14 +68,14 @@ services:
|---------------------|-------------------------------------------------|------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------|
| `PRODUCT_NAMES` | The exact GPU names you're searching for | `RTX 5080, RTX 5090` | |
| `DISCORD_WEBHOOK_URL` | Your Discord webhook URL | A valid URL | |
| `DISCORD_NOTIFICATION_CURRENCY` | Your country currency | A text, e.g. `$`, ``, `£`... | `€` |
| `COUNTRY` | Your country (only one). API localization, Discord notification currency and language will be set accordingly | `GB`, `US`, `CA`, `BE`, `NL`, `DK`, `DE`, `ES`, `FR`, `IT`, `NO`, `AT`, `PL`, `FI`, `SE`, `KR`, `JP`
| `US` |
| `DISCORD_SERVER_NAME` | The name of your server, displayed in notification's footer | A text | Shared for free |
| `DISCORD_NOTIFICATION_LANGUAGE` | Your language for notification's content | `bg`, `cs`, `da`, `de`, `el`, `en`, `es`, `et`, `fi`, `fr`, `ga`, `hr`, `hu`, `it`, `lt`, `lv`, `mt`, `nl`, `pl`, `pt`, `ro`, `sk`, `sl`, `sv` | `en` |
| `DISCORD_ROLES` | List of Discord roles ID in the same order than `PRODUCT_NAMES` values, found in your discord server settings (with user profile developer mode enabled) | `<@&12345><@&6789>` | @everyone |
| `REFRESH_TIME` | Script refresh interval in seconds | `60`, `30`, etc. | `30` |
| `API_URL_SKU` | API listing the product | A URL. API url can change over time. For now, you can use the default one and change the `locale` parameter to yours (e.g. `locale=en-gb`) | `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. API url can change over time. For now, you can use the default one and change the `locale` parameter to yours (e.g. `locale=en-gb`) | `https://api.store.nvidia.com/partner/v1/feinventory?locale=fr-fr&skus=` |
| `PRODUCT_URL` | GPU purchase URL. There isn't any direct link workinf right now, so put the generic marketplace url listing all FE products | A URL. API url can change over time. For now, you can use the default one and change the locale parameter to yours (e.g. `/en-gb/`) | `https://marketplace.nvidia.com/fr-fr/consumer/graphics-cards/?locale=fr-fr&page=1&limit=12&manufacturer=NVIDIA` |
| `API_URL_SKU` | API listing the product. Use it for development purpose. __Warning__ : it will override the locale set by `COUNTRY`. | An URL | https://api.nvidia.partners/edge/product/search?page=1&limit=100&locale={locale}&Manufacturer=Nvidia` |
| `API_URL_STOCK` | API providing stock data. Use it for development purpose. __Warning__ : it will override the locale set by `COUNTRY`. | A URL | `https://api.store.nvidia.com/partner/v1/feinventory?locale={locale}&skus=` |
| `PRODUCT_URL` | GPU purchase URL. Use it for development purpose. __Warning__ : it will override the locale set by `COUNTRY`. | A URL | `https://marketplace.nvidia.com/fr-fr/consumer/graphics-cards/?locale={locale}&page=1&limit=12&manufacturer=NVIDIA` |
| `TEST_MODE` | For testing without sending notifications | `True`, `False` | `False` |
| `PYTHONUNBUFFERED` | Enables real-time log output | `1`, `0` | `1` |
@ -153,13 +151,10 @@ git clone https://git.djeex.fr/Djeex/nvidia-stock-bot.git
```sh
export DISCORD_WEBHOOK_URL="https://your_discord_url"
export DISCORD_NOTIFICATION_CURRENCY=
export COUNTRY=
export PRODUCT_NAMES=RTX 5080, RTX 5090
export DISCORD_ROLES=<@&12345>, <@&6789>
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 TEST_MODE=false
export PYTHONUNBUFFERED=1
```