This is a personal project of mine, it is by no means stable and I have no idea what I'm doing. A much more stable and flexible alternative can be found HERE.
Notify Discord or Win10 of European Nvidia Founders Edition card stock. Controlled through command line.
- Discord Notifications via Webhooks
- Clone/Download the /script folder to your prefered location
- Install dependancies with pip
pip install -r requirements.txt
orpython -m pip install -r requirements.txt
- If running windows, use
win-requirements.txt
instead. - On some Linux/Mac systems, you may need to use
python3
andpip3
instead ofpython
andpip
, respectively.
- Configure the
cfg.json
file - Set up a method to control the bot like tmux or a systemd service (optional):
# Put me in /etc/systemd/system/
# Change the username value, 'WorkingDirectory' and 'ExecStart' paths
[Unit]
Description=NvidiaFE-notify bot
After=multi-user.target
[Service]
User=<username>
WorkingDirectory=/path/to/directory/NvidiaFE-notify/script/
ExecStart=/usr/bin/python3 /path/to/script/NvidiaFE-notify/script/bot.py
KillSignal=SIGINT
[Install]
WantedBy=multi-user.target
Alias=nvidiafe-notify
Change the behaviour of the program with the cfg.json
file. The program will run without any additional configuration, but alerts are disabled by default.
It is recommended that you enable at least one notification method, as the program serves almost no purpose without it. See the settings below:
- value: valid url
- description: API url to query Nvidia's product page. You can get your own with this guide.
- value: number (can be decimal)
- description: The time paused before the next query to the API specified. This can be set to anything above zero.
-
path - value: file path
- description: Path to store the logs from the script. Supports OS paths.
-
maxSize - value: number (integer)
- description: The maximum size the log file can grow to, measured in Kb.
-
enabled - value: true or false
- description: Determines whether Discord alerts are to be used.
-
webhookUrl - value: text
- description: The url webhook from Discord collected in the optional requirements.
-
roleID - value: number
- description: The identifying, numerical code for a role to mention on the Discord server in the alert message sent.
-
enabled - value: true or false
- description: Determines whether win10toast alerts are to be used.
-
icon - value: file path
- description: Path to the icon file used in the notification. Supports OS paths.
NvidiaFE-notify is a command line tool. It's intended usage is as a linux systemd service, a template can be found here. The bot can also be executed through the shell, therefore tmux can also be used.
In linux, using the systemd service, the bot can be started with the following:
sudo systemctl start nvidiafe-notify
The bot can still be executed throught the shell on Windows and Linux systems. This is where you will need to be a bit more creative, however. The main issue is stopping the bot. This will need to be done by ending the process manually.
In Linux bash the script can be started with the &
character at the end while the ssh session is active:
python bot.py &
In Windows the script can be started in PowerShell by using pythonw.exe
, which allows the script to run silently.
& pythonw .\bot.py
- HazNut - Greatly helped with styling and using requests, modules and general syntax. Fixed slow API requests using User-Agent header.