From 0535319a72ca7c38c44f2268e61147ec7324d7dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Gl=C3=BCpker?= Date: Sat, 8 Oct 2022 21:01:00 +0200 Subject: Rename old typo s/Premade/Premate --- SteamAPI.py | 2 +- main.py | 14 ++-- pyproject.toml | 2 +- static/style.css | 3 +- templates/lobby_html.jinja | 2 +- templates/premades_html.jinja | 159 ------------------------------------------ templates/premates_html.jinja | 159 ++++++++++++++++++++++++++++++++++++++++++ templates/server_html.jinja | 2 +- 8 files changed, 171 insertions(+), 172 deletions(-) delete mode 100644 templates/premades_html.jinja create mode 100644 templates/premates_html.jinja diff --git a/SteamAPI.py b/SteamAPI.py index 95a7105..3ac4eeb 100644 --- a/SteamAPI.py +++ b/SteamAPI.py @@ -371,7 +371,7 @@ class SteamAPI: return result - def getDataForPremadefinder(self, steamids): + def getDataForPrematefinder(self, steamids): futures = dict() futures["profiles"] = executor.submit(self.getProfiles, steamids) diff --git a/main.py b/main.py index 5fd96a1..febee60 100755 --- a/main.py +++ b/main.py @@ -180,10 +180,10 @@ def lobby(): ) -@app.route("/premadefinder", methods=["GET", "POST"]) -def premades(): +@app.route("/prematefinder", methods=["GET", "POST"]) +def premates(): steamids = [] - premadedata = dict() + prematedata = dict() connections = set() if request.method == "POST": @@ -197,21 +197,21 @@ def premades(): ) # Ask steam about profiles - premadedata = steam.getDataForPremadefinder(steamids) + prematedata = steam.getDataForPrematefinder(steamids) # Add connection between friends. # Friends are always bidirectional, so we use set and min/max to avoid duplicates for steamid in steamids: - for friend in premadedata[steamid]["_friends"]: + for friend in prematedata[steamid]["_friends"]: if friend in steamids: friend_a = min(steamid, friend) friend_b = max(steamid, friend) connections.add((friend_a, friend_b)) return render_template( - "premades_html.jinja", + "premates_html.jinja", steamids=steamids, - profiles=premadedata, + profiles=prematedata, current_time=time.time(), connections=connections, ) diff --git a/pyproject.toml b/pyproject.toml index ecb7ddb..3ac3b2f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,7 @@ [tool.poetry] name = "lobbyfinder" version = "0.1.0" -description = "Page to join my friends lobbies and check for premades" +description = "Page to join my friends lobbies and check for premates" authors = ["André Glüpker "] [tool.poetry.dependencies] diff --git a/static/style.css b/static/style.css index 9544769..d76b111 100644 --- a/static/style.css +++ b/static/style.css @@ -106,7 +106,7 @@ div.form { border: 1px dashed gray; text-align: center; } -div#premades { +div#premates { border: 1px dashed rgb(150, 150, 0); height: 500px; } @@ -271,4 +271,3 @@ span.snooze { color: rgb(135, 134, 135); } span.lookingtotrade { color: rgb(255, 255, 0); } span.lookingtoplay { color: rgb(0, 255, 0); } span.offline,a.offline { color: rgb(137, 137, 137); } - diff --git a/templates/lobby_html.jinja b/templates/lobby_html.jinja index 0564e55..e6ed28f 100644 --- a/templates/lobby_html.jinja +++ b/templates/lobby_html.jinja @@ -12,7 +12,7 @@ - + {% with messages = get_flashed_messages() %} diff --git a/templates/premades_html.jinja b/templates/premades_html.jinja deleted file mode 100644 index 539815a..0000000 --- a/templates/premades_html.jinja +++ /dev/null @@ -1,159 +0,0 @@ - - - Steam Premadefinder - - - - - - - - - -
- Copy&Paste den Inhalt von 'status' aus der Konsole.
-
-
- -
-
- - {% if steamids %} - - -
-
- -
- Steamspiele: Anzahl von Steamspielen mit Spielzeit.
- Spielzeit: Die aktive Spielzeit in CSGO.
- Private Profile sind durch einen roten Rahmen gekennzeichnet.
-
- {% endif %} - -
- - {% for profile in profiles.values() %} -
- -
- {% if profile['communityvisibilitystate'] == 3 %} - Account erstellt am: {{ profile['timecreated'] | display_time }}
- Spiele in Besitz: {{ profile['_ownedPlayedGames']|e }}
- {% if profile['_userstats'] %} - Spielzeit: {{ profile['_userstats']['total_time_played']|display_age }}
- {% else %} - Spielzeit: N/A - {% endif %} - {% else %} - Profile private - {% endif %} -
-
- {% endfor %} - - - diff --git a/templates/premates_html.jinja b/templates/premates_html.jinja new file mode 100644 index 0000000..b891bac --- /dev/null +++ b/templates/premates_html.jinja @@ -0,0 +1,159 @@ + + + Steam Prematefinder + + + + + + + + + +
+ Copy&Paste den Inhalt von 'status' aus der Konsole.
+
+
+ +
+
+ + {% if steamids %} + + +
+
+ +
+ Steamspiele: Anzahl von Steamspielen mit Spielzeit.
+ Spielzeit: Die aktive Spielzeit in CSGO.
+ Private Profile sind durch einen roten Rahmen gekennzeichnet.
+
+ {% endif %} + +
+ + {% for profile in profiles.values() %} +
+ +
+ {% if profile['communityvisibilitystate'] == 3 %} + Account erstellt am: {{ profile['timecreated'] | display_time }}
+ Spiele in Besitz: {{ profile['_ownedPlayedGames']|e }}
+ {% if profile['_userstats'] %} + Spielzeit: {{ profile['_userstats']['total_time_played']|display_age }}
+ {% else %} + Spielzeit: N/A + {% endif %} + {% else %} + Profile private + {% endif %} +
+
+ {% endfor %} + + + diff --git a/templates/server_html.jinja b/templates/server_html.jinja index 7d4e5c7..01cecb2 100644 --- a/templates/server_html.jinja +++ b/templates/server_html.jinja @@ -10,7 +10,7 @@ -- cgit v1.2.3