This fork is used to compile .proto files into mirrored Python .py files with betterproto compiler. Those files or their part are later edited to be used in Gobot1234/steam.py.
The repository contains extra content:
proto.exe- from protobuf/releases.compile.ps1file in it for easy compiling files in batches.- compiled
.pyproto-mirrors for- Dota 2:
./dota2/py_mirrors
- Dota 2:
- Script to fix
.pyfiles (this is probably more suitable for some cursed post-commit git-action ci)-
CMsgand similark_msg_somethingpointless prefixes -
GCpointless prefixes to enums (but keep GCToClient or similar ones) - Remove
DOTAprefixes - When they repeat class name in enums vars - remove it from enum var names
- PascalCase for enum variables and class names
- ^Meaning remove
_from them too -
@dataclassinto@dataclass(eq=False, repr=False) - Change
Listtolist - Remove " in their
List["Something"] - add
from __future__ import annotations - Add one line-break before that^ and after
#disclaimer comments - resolve
TYPE_CHECKINGrelative imports from other files - Change
Optionalto| None - Reformat with black/isort/ruff in case some strings went below line limit or something
-
- Edit
compile.ps1- include check if
betterproto[compiler]is installed - Paste google
descriptor.protodependency to compiling folder if it isn't present. - Pull/Merge from Parent Repo
- Loop over all root folders like
csgo,steam,tf2 - Clean up empty directories it sometimes makes
- include check if
- Rethink folder structure - is there anything better than trashing everything into extra folder.
- Before using
compile.ps1remember to setup to venv withpip install "betterproto[compiler]"installed. - Remember to paste google
descriptor.protodependency if it isn't present. - I only compiled dota2
.proto-files but it should work for other folders as well
These protobufs are being dumped as updates come in the SteamTracking repository.
Protobufs are dumped using SteamKit's protobuf dumper.
For protobufs dumped from javascript files (in webui folder), we have a separate dumper which parses javascript files into abstract syntax tree and tries to find all the messages and services. As such, these dumps are not as complete as dumps from binary files because minified javascript files lack some information.
Note
Artifact and Underlords protobufs are no longer being updated automatically.