-
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
24 changed files
with
1,170 additions
and
272 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,8 @@ | ||
.git | ||
.github | ||
.venv | ||
|
||
cache | ||
modules/__pycache__ | ||
cache/* | ||
|
||
.env |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
.venv | ||
__pycache__ | ||
|
||
cache | ||
modules/__pycache__ | ||
|
||
.env |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,20 @@ | ||
FROM python:3.9.2-slim | ||
|
||
RUN groupadd -r bot && \ | ||
useradd -r -m -d /app -g bot bot && \ | ||
mkdir -p /app/.config /app/cache && \ | ||
chown -R bot:bot /app | ||
USER bot | ||
|
||
WORKDIR /app | ||
|
||
COPY ./requirements.txt . | ||
RUN python -m pip install --upgrade pip --no-warn-script-location && \ | ||
python -m pip install -r requirements.txt --no-warn-script-location | ||
|
||
COPY ./ . | ||
RUN pip3 install --upgrade pip && pip3 install -r requirements.txt | ||
|
||
ENTRYPOINT [ "python3" ] | ||
VOLUME ["/app/.config", "/app/cache"] | ||
|
||
ENTRYPOINT [ "python" ] | ||
CMD [ "app.py" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,175 @@ | ||
# Steam Update Notifier | ||
# Game Update Notifier | ||
|
||
A Python script that will let you know via Discord as soon as a new version of your favorite game on Steam is released. | ||
A bot that will let you know via Discord as soon as a new version of your favorite game on Steam, Epic Games, and Microsoft Store are released. | ||
|
||
## TODO | ||
This bot tracks actual package updates, instead of updates of any news feeds like blog posts or release notes, so you can be the first to know the release of the new patches. | ||
|
||
* Support multiple apps, multiple branches | ||
![Sample message for updates on Steam](https://user-images.githubusercontent.com/2920259/120804770-ff51c700-c57f-11eb-8c0d-79f821266bf3.png) | ||
![Sample message for updates on Epic Games](https://user-images.githubusercontent.com/2920259/120804784-01b42100-c580-11eb-80b4-a62cf65b370a.png) | ||
![Sample message for updates on Microsoft Store](https://user-images.githubusercontent.com/2920259/120804776-011b8a80-c580-11eb-8d45-28e7efa94dd7.png) | ||
|
||
## Table of Contents | ||
|
||
- [Game Update Notifier](#game-update-notifier) | ||
- [Table of Contents](#table-of-contents) | ||
- [Supported Platforms](#supported-platforms) | ||
- [Targets to Track](#targets-to-track) | ||
- [Notification Destination](#notification-destination) | ||
- [Installation](#installation) | ||
- [Requirements](#requirements) | ||
- [Prepare your Discord](#prepare-your-discord) | ||
- [Prepare Application IDs to track](#prepare-application-ids-to-track) | ||
- [Steam](#steam) | ||
- [Epic Games](#epic-games) | ||
- [Microsoft Store](#microsoft-store) | ||
- [Prepare Environment Variables (`.env`)](#prepare-environment-variables-env) | ||
- [Run the Bot](#run-the-bot) | ||
- [Data Persistence](#data-persistence) | ||
- [Related Projects](#related-projects) | ||
|
||
## Supported Platforms | ||
|
||
### Targets to Track | ||
|
||
| Platform | Auth | Products | | ||
| ----------------- | -------------- | ---------------------------- | | ||
| ✅ Steam | ✅ Not required | ✅ Unrestricted | | ||
| ✅ Microsoft Store | ✅ Not required | ✅ Unrestricted | | ||
| ✅ Epic Games | ⚠️ Required | ⚠️ Only products that you own | | ||
|
||
### Notification Destination | ||
|
||
| Platform | Target | Method | | ||
| --------- | -------------- | --------- | | ||
| ✅ Discord | ✅ Users, Roles | ✅ Webhook | | ||
|
||
## Installation | ||
|
||
### Requirements | ||
|
||
- Docker (Or Podman) | ||
- Docker Compose | ||
|
||
### Prepare your Discord | ||
|
||
1. Get **Webhook URL** for the Channel in your Guild that the notification message to be posted. | ||
2. (If required) Get **User IDs** to be mentioned in the notification message. | ||
3. (If required) Get **Role IDs** to be mentioned in the notification message. | ||
|
||
### Prepare Application IDs to track | ||
|
||
Prepare Product IDs on each platform that you want to track. | ||
|
||
#### Steam | ||
|
||
Get **Application ID** from the URL of [the store page](https://store.steampowered.com/) for each product. | ||
|
||
- For example, the URL of **Outer Wilds** is `https://store.steampowered.com/app/753640/Outer_Wilds/` | ||
- The Application ID that can be found in the URL is `753640` | ||
|
||
For bundle SKU that include multiple products, obtain the ID of the actual product included in the bundle (i.e. **Among Us** (`945360`) instead of **Among Us Starter Pack** (`16867`)). | ||
|
||
Get **Branch Name** of the product to track. You can use the helper script in this repository to gather branch name for each product. Usualy `public` is the best branch to track. | ||
|
||
```bash | ||
$ docker-compose run --rm notifier helper/app_finder.py -p steam -i 753640 | ||
KEY App Id Name Branch Updated Time | ||
-------------- -------- ----------- -------- -------------- | ||
753640:public 753640 Outer Wilds public 1595281461 | ||
753640:neowise 753640 Outer Wilds neowise 1603749868 | ||
753640:staging 753640 Outer Wilds staging 1594088316 | ||
``` | ||
|
||
Keep the value of the `KEY` column (`<App Id>:<Branch>`) of the row of the branch you want to track. This value can be used to prepare `.env` file in later steps. | ||
|
||
#### Epic Games | ||
|
||
Get **Application ID** by using the helper script in this repository. | ||
|
||
First, run the following command and open the indicated URL in your browser. Once authenticated, keep the `sid` displayed and enter the `sid` to the prompt. | ||
|
||
```bash | ||
$ docker-compose run --rm notifier helper/epicgames_auth.py | ||
[cli] INFO: Testing existing login data if present... | ||
Please login via the epic web login! | ||
If web page did not open automatically, please manually open the following URL: https://www.epicgames.com/id/login?redirectUrl=https://www.epicgames.com/id/api/redirect | ||
Please enter the "sid" value from the JSON response: 14b8c***********************8fb5 | ||
[cli] INFO: Successfully logged in as "<Your Account>" | ||
``` | ||
Then run the following command to get the list of the products that you own. | ||
```bash | ||
$ docker-compose run --rm notifier helper/app_finder.py -p epicgames | ||
[Core] INFO: Trying to re-use existing login session... | ||
KEY App Id Name Build Version | ||
-------------------------------- -------------------------------- --------------------------- ------------------ | ||
963137e4c29d4c79a81323b8fab03a40 963137e4c29d4c79a81323b8fab03a40 Among Us 2021.5.25.2 | ||
bcbc03d8812a44c18f41cf7d5f849265 bcbc03d8812a44c18f41cf7d5f849265 Cities: Skylines 1.13.3-f9 | ||
Kinglet Kinglet Sid Meier's Civilization VI 1.0.12.564030h_rtm | ||
``` | ||
Keep the value of the `KEY` column (equals to `App Id`) of the product you want to track. This value can be used to prepare `.env` file in later steps. | ||
#### Microsoft Store | ||
Get **Application ID** from the URL of [the store page](https://www.microsoft.com/en-us/store/games/windows) for each product. | ||
- For example, the URL of **Minecraft for Windows 10** is `https://www.microsoft.com/en-us/p/minecraft-for-windows-10/9nblggh2jhxj` | ||
- The Product ID that can be found in the URL is `9nblggh2jhxj` | ||
For bundle SKU that include multiple products, obtain the ID of the actual product included in the bundle (i.e. **Minecraft for Windows 10** (`9nblggh2jhxj`) instead of **Minecraft for Windows 10 Starter Collection** (`9n4km90ctzt6`)). | ||
Get **Platform Name** of the product to track. You can use the helper script in this repository to gather platform name for each product. Usualy `Windows.Desktop` or `Windows.Universal` is the best platform to track. | ||
```bash | ||
$ docker-compose run --rm notifier helper/app_finder.py -p msstore -m JP -i 9nblggh2jhxj | ||
KEY App Id Market Name Platform Package Name | ||
------------------------------ ------------ -------- ------------------------ ----------------- ------------------------------------------------------- | ||
9nblggh2jhxj:Windows.Xbox 9nblggh2jhxj JP Minecraft for Windows 10 Windows.Xbox Microsoft.MinecraftUWP_1.16.22101.70_x86__8wekyb3d8bbwe | ||
9nblggh2jhxj:Windows.Universal 9nblggh2jhxj JP Minecraft for Windows 10 Windows.Universal Microsoft.MinecraftUWP_1.16.22101.0_x86__8wekyb3d8bbwe | ||
9nblggh2jhxj:Windows.Universal 9nblggh2jhxj JP Minecraft for Windows 10 Windows.Universal Microsoft.MinecraftUWP_1.16.22101.0_arm__8wekyb3d8bbwe | ||
9nblggh2jhxj:Windows.Xbox 9nblggh2jhxj JP Minecraft for Windows 10 Windows.Xbox Microsoft.MinecraftUWP_1.16.22101.70_arm__8wekyb3d8bbwe | ||
9nblggh2jhxj:Windows.Universal 9nblggh2jhxj JP Minecraft for Windows 10 Windows.Universal Microsoft.MinecraftUWP_1.16.22101.0_x64__8wekyb3d8bbwe | ||
9nblggh2jhxj:Windows.Xbox 9nblggh2jhxj JP Minecraft for Windows 10 Windows.Xbox Microsoft.MinecraftUWP_1.16.22101.70_x64__8wekyb3d8bbwe | ||
``` | ||
Keep the value of the `KEY` column (`<App Id>:<Platform>`) of the row of the platform you want to track. This value can be used to prepare `.env` file in later steps. | ||
### Prepare Environment Variables (`.env`) | ||
Copy `sample.env` as `.env` and fill in the each lines to suit your requirements. Follow the instructions in the `.env` file. | ||
### Run the Bot | ||
If you want to track the products on Epic Games, first store the credential in the volume. | ||
Run the following command and open the indicated URL in your browser. Once authenticated, keep the `sid` displayed and enter the `sid` to the prompt. | ||
```bash | ||
$ docker-compose run --rm notifier helper/epicgames_auth.py | ||
[cli] INFO: Testing existing login data if present... | ||
Please login via the epic web login! | ||
If web page did not open automatically, please manually open the following URL: https://www.epicgames.com/id/login?redirectUrl=https://www.epicgames.com/id/api/redirect | ||
Please enter the "sid" value from the JSON response: 14b8c***********************8fb5 | ||
[cli] INFO: Successfully logged in as "<Your Account>" | ||
``` | ||
Once everything goes good, simply start the Bot by following command. | ||
```bash | ||
docker-compose up -d | ||
``` | ||
## Data Persistence | ||
- `/app/cache`, `./cache` | ||
- Used to cache gathered data. | ||
- `/app/.config`, `~/.config` | ||
- Used to store credential for Epic Games. | ||
## Related Projects | ||
- [lovvskillz/python-discord-webhook](https://github.com/lovvskillz/python-discord-webhook) | ||
- [ValvePython/steam](https://github.com/ValvePython/steam) | ||
- [derrod/legendary](https://github.com/derrod/legendary) |
Oops, something went wrong.