Skip to content

Commit

Permalink
Update card
Browse files Browse the repository at this point in the history
  • Loading branch information
Nicconike committed May 29, 2024
1 parent f47e200 commit b3b8e6c
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 21 deletions.
1 change: 0 additions & 1 deletion .github/workflows/steam-stats.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ jobs:
STEAM_API_KEY: ${{ secrets.STEAM_API_KEY }}
STEAM_ID: ${{ secrets.STEAM_ID }}
STEAM_CUSTOM_ID: ${{ secrets.STEAM_CUSTOM_ID }}
STEAM_APP_ID: ${{ secrets.STEAM_APP_ID }}
run: python api/main.py
- name: Commit and push if changes
run: |
Expand Down
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,7 @@
[![Visitor Badge](https://badges.pufler.dev/visits/nicconike/steam-stats)](https://badges.pufler.dev)

<!-- Steam-Stats start -->
![Steam Summary](https://github.com/Nicconike/Steam-Stats/blob/master/assets/steam_summary.html?sanitize=true)![Steam Games Stats](https://github.com/Nicconike/Steam-Stats/blob/master/assets/recently_played_games.html?sanitize=true)
<!-- Steam-Stats end -->

<!-- Steam-Workshop start -->
![Steam Workshop Stats](https://github.com/Nicconike/Steam-Stats/blob/master/assets/steam_workshop_stats.svg?sanitize=true)
<!-- Steam-Workshop end -->
19 changes: 1 addition & 18 deletions api/card.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,5 @@
"""Generate Cards for Steam Stats"""
import datetime
import os
from dotenv import load_dotenv
from steam_stats import get_player_summaries, get_recently_played_games

load_dotenv()

# Secrets Configuration
STEAM_API_KEY = os.getenv("STEAM_API_KEY")
STEAM_ID = os.getenv("STEAM_ID")


def format_unix_time(unix_time):
Expand Down Expand Up @@ -103,7 +94,7 @@ def generate_card_for_player_summary(player_data):
return (
"![Steam Summary]("
"https://github.com/Nicconike/Steam-Stats/blob/master/assets/steam_summary.html"
"?sanitize=true)"
"?sanitize=true)\n"
)


Expand Down Expand Up @@ -162,11 +153,3 @@ def generate_card_for_played_games(games_data):
"https://github.com/Nicconike/Steam-Stats/blob/master/assets/recently_played_games.html"
"?sanitize=true)"
)


if __name__ == "__main__":
summary = get_player_summaries()
recent_game = get_recently_played_games()
summary_content = generate_card_for_player_summary(summary)
recently_played_games = generate_card_for_played_games(
recent_game)

1 comment on commit b3b8e6c

@vercel
Copy link

@vercel vercel bot commented on b3b8e6c May 29, 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.