Set of binaries for working with Steam Workshop. Utilizes Steamworks, so Steam must be running for this to work.
Included are
workshop
for downloading and inspecting workshop itemsgma
for working with Garry's Mod Addon files```bash
workshop info 1512211167
workshop get 1512211167 > file.gma
workshop get 1512211167 | gma list -
workshop get 1512211167 | gma unpack - out
workshop get 1512211167 | gma cat - "**.lua"
workshop get 426998109 | gma cat - | grep http
workshop get 2137434632 | gma unpack - out && echo date
> out/date.txt && gma pack out | workshop update 2137434632 -
```
Compile with Steamworks SDK, e.g. STEAM_SDK_LOCATION=~/Downloads/steam_sdk cargo build
You can test locally with cargo run --bin workshop -- get 1512211167 | cargo run --bin gma -- list
For general use you'll probably want to install the binaries and place them on PATH. For that you can use STEAM_SDK_LOCATION=~/Downloads/steam_sdk cargo install --path .
If you get a fun error (like dyld: Library not loaded: @loader_path/libsteam_api.dylib
on OS X), try moving the dynamic library file (dylib,so,dll) from steam_sdk/redistributable_bin/<os>/
to where the binaries were installed to.
If you run any of the workshop commands without a game running in the background, Steam will not be able to figure out the app_id and the binary will crash.
You can fix that by creating steam_appid.txt
in the working directory or SteamAppId
environment variable with the app id.
The workshop
binary provides -a <id>
option to temporarily create the file with given id,
and it'll also try its best to clean up the file before the command finishes.