Skip to content

Instantly share code, notes, and snippets.

@ZacharyTalis
Created December 6, 2021 15:24
Show Gist options
  • Save ZacharyTalis/0c1e03dec951d2bb062a8d212981897c to your computer and use it in GitHub Desktop.
Save ZacharyTalis/0c1e03dec951d2bb062a8d212981897c to your computer and use it in GitHub Desktop.
Python/SteamCMD Game Updater
import json
import os
with open("<json path>") as file:
secrets = json.load(file)
appsInstalled = (
os.popen(f"steamcmd +login {secrets['login']['username']} +apps_installed +quit")
.read()
.split("\n")
)
appsInstalled = [
appLine.split(" ")[1] for appLine in appsInstalled if appLine.startswith("AppID")
]
updateCommand = f"+app_update {' +app_update '.join(appsInstalled)}"
os.system(f"steamcmd +login {secrets['login']['username']} {updateCommand} +quit")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment