From d318c65d6c7ec04532758525a7b5f23ba812ae23 Mon Sep 17 00:00:00 2001 From: Djeex Date: Sun, 13 Jul 2025 10:44:46 +0000 Subject: [PATCH] Nvidia-stock-bot v4 --- content/5.nonsense/2.python.md | 6 ++++++ public/img/nonsense/nvidia-stock-bot-en-v4.svg | 5 +++++ 2 files changed, 11 insertions(+) create mode 100644 public/img/nonsense/nvidia-stock-bot-en-v4.svg diff --git a/content/5.nonsense/2.python.md b/content/5.nonsense/2.python.md index 243c8d1..a345ddf 100644 --- a/content/5.nonsense/2.python.md +++ b/content/5.nonsense/2.python.md @@ -26,6 +26,12 @@ To this: ![Nvidia Stock bot](/img/nonsense/nvidia-stock-bot-en.svg) +And more recently : + +![Nvidia Stock bot](/img/nonsense/nvidia-stock-bot-en-v4.svg) + +And I was also lucky enough to be referenced in the famous [selfhost newsletter](https://selfh.st/weekly/2025-07-11/) ! + More info directly on the repo: ::card diff --git a/public/img/nonsense/nvidia-stock-bot-en-v4.svg b/public/img/nonsense/nvidia-stock-bot-en-v4.svg new file mode 100644 index 0000000..f216d9e --- /dev/null +++ b/public/img/nonsense/nvidia-stock-bot-en-v4.svg @@ -0,0 +1,5 @@ + + +Updating variables(defined in theconfiguration)Discord WebhookURLExec frequencyCountryProducts NamesSetting localizationCountryError if incorrectvariable settingsXDiscord rolesLocaleslocalization.jsonCurrencyLanguageLocalizedAPI URLsCurrencylanguages.jsonTranslatedvariablesIf errorFallback to USXIf errorFallback to englishXenv_config.pyMapping rolesto product namesProducts NamesDiscord rolesProduct 1Product 2Role 1Role 2Error if numbers not matchingXPrinting all variablesvalues in logsStart the scriptmain.pyLoop product checkergpu_checker.pyQuerying Nvidia productsvia the previously configured API URLLocalizedProduct APIAPI response with a list of product information and saved SKUs/UPCsJSONIf different SKU?If similar SKU?Discord notificationVia the webhook urlDiscord WebhookURL!Stock APIBuilding the Stock API URLAPI_URLSKU+=Querying Nvidia's inventory via the previouslyconfigured API URLAPI_URLAPI responsewith statusSKUUPCLooking for in responseJSONIf out of stock If previoulsy in stockRecording the "out_of_stock" statusIf in stockRecording the "in_stock" statusDisplaying status in the log historyDiscord notificationVia the webhook urlURL du webhookDiscord!????UPC If previoulsy in stockIf previously out of stock??If previously out of stockDiscord notificationVia the webhook urlURL du webhookDiscord!JSONBuilding discordNotificationDiscord WebhookURLCurrencyDiscord rolesProducts NamesTranslatedvariablesnotifier.pyLocalizedStock APILocalizedProduct URLNvidia Stock Bot - v4.0Exec frequency \ No newline at end of file