Skip to content

Commit

Permalink
Update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
Nicconike committed Jun 7, 2024
1 parent 8762684 commit 9b5a2cc
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 8 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/steam-stats.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,11 @@ jobs:
cache: "pip"

- name: Install dependencies
run: pip install -r requirements.txt
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
env:
PYPPETEER_HOME: /home/runner/work/Steam-Stats/Steam-Stats/pyppeteer_home

- name: Update Steam Stats in README
run: python api/main.py
Expand All @@ -37,7 +41,6 @@ jobs:
INPUT_STEAM_CUSTOM_ID: ${{ secrets.STEAM_CUSTOM_ID }}
INPUT_WORKSHOP_STATS: True
INPUT_LOG_SCALE: True
PYPPETEER_HOME: /home/runner/work/Steam-Stats/Steam-Stats/pyppeteer_home

- name: Clean up Chromium files
run: |
Expand Down
17 changes: 11 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ schedule:
- cron: "30 18 * * 0"
```
## Samples (From my Steam Account)
## Samples (From my [Steam Account](https://steamcommunity.com/id/nicconike/))
**Example for Steam User Stats**
<!-- Steam-Stats start -->
![Steam Summary](https://github.com/Nicconike/Steam-Stats/blob/master/assets/steam_summary.png)
Expand All @@ -37,8 +37,8 @@ schedule:
![Steam Workshop Stats](https://github.com/Nicconike/Steam-Stats/blob/master/assets/steam_workshop_stats.png)
<!-- Steam-Workshop end -->
## Update Readme
1. Add this comment in your markdown file(Readme.md) which is for Steam User Stats
## Update README.md
1. Add below comment in your markdown file(Readme.md) for Steam User Stats
```md
<!-- Steam-Stats start -->
<!-- Steam-Stats end -->
Expand All @@ -48,6 +48,7 @@ schedule:
<!-- Steam-Workshop start -->
<!-- Steam-Workshop end -->
```
3. Don't forget to add these comments in your readme file or wherever you want to display your steam stats, because without the comments the readme will not get updated

## Features
1. Steam Player Summary[^*]
Expand All @@ -60,12 +61,14 @@ schedule:
2. Steam's Recently Played Games in the last 2 weeks
1. The Graph plot for recently played games is by default implemented in a fixed scale but if you want you can update it to be in a logarithmic scale by using this flag: `LOG_SCALE: True`
2. When `LOG_SCALE` is `False`

![Recently Played Games](https://github.com/Nicconike/Steam-Stats/blob/master/assets/recently_played_games(linear).png)
3. When `LOG_SCALE` is `True`

![Recently Played Games](https://github.com/Nicconike/Steam-Stats/blob/master/assets/recently_played_games(logarithmic).png)
2. Steam Workshop Stats (Optional)
1. Workshop Stats Module can be activated/used by adding this flag in the workflow file in the environment variables: `WORKSHOP_STATS: True`
2. This module displays the total number of Unique Visitors, Subscribers and Favorites
2. This module displays the total number of Unique Visitors, Subscribers and Favorites for your Steam Workshop Items

## Setup with Example
After completing the steps mentioned in the [Prerequisites](#Prerequisites), you have to save all the mentioned keys(except markdown comments) like github token,api key, steamid, customid as Secrets in your Github repo's settings.
Expand All @@ -74,7 +77,7 @@ After completing the steps mentioned in the [Prerequisites](#Prerequisites), you

If you are new to github secrets then you can checkout this doc [here](https://docs.github.com/en/actions/security-guides/using-secrets-in-github-actions). And from [here](https://docs.github.com/en/actions/security-guides/automatic-token-authentication) you can learn about Github Tokens.

Sample Workflow File
**Sample Workflow File**
```yml
name: Steam Stats
Expand All @@ -94,6 +97,8 @@ jobs:
STEAM_API_KEY: ${{ secrets.STEAM_API_KEY }}
STEAM_ID: ${{ secrets.STEAM_ID }}
STEAM_CUSTOM_ID: ${{ secrets.STEAM_CUSTOM_ID }}
WORKSHOP_STATS: True
LOG_SCALE: True
```

[^*]: Unfortunately, Steam API doesn't support Web Sockets so the profile status cannot be updated as soon as it gets updated in steam profile 🥲
[^*]: Unfortunately, Steam Web API doesn't support Web Sockets so the profile status cannot be updated in real time as it gets updated in steam profile 🥲

1 comment on commit 9b5a2cc

@vercel
Copy link

@vercel vercel bot commented on 9b5a2cc Jun 7, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.