Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/woctezuma/add-free-licenses
Automatically add free licenses on Steam.
https://github.com/woctezuma/add-free-licenses
addlicense archisteamfarm asf asf-api asf-ipc free-games free-packages freegames license-activation steam steam-api steam-data steam-farm steam-games steam-store steam-tools steam-web steamctl steamdb steamdb-freegames
Last synced: 2 months ago
JSON representation
Automatically add free licenses on Steam.
- Host: GitHub
- URL: https://github.com/woctezuma/add-free-licenses
- Owner: woctezuma
- License: mit
- Created: 2022-11-18T10:24:12.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2023-12-03T11:10:17.000Z (about 1 year ago)
- Last Synced: 2023-12-03T12:23:12.658Z (about 1 year ago)
- Topics: addlicense, archisteamfarm, asf, asf-api, asf-ipc, free-games, free-packages, freegames, license-activation, steam, steam-api, steam-data, steam-farm, steam-games, steam-store, steam-tools, steam-web, steamctl, steamdb, steamdb-freegames
- Language: Python
- Homepage:
- Size: 140 KB
- Stars: 2
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
> [!Note]
> Consider switching to the ASF plugin [**`FreePackages`**][asf-free-citrinate] developped by **Citrinate**!# Add Free Licenses
This repository contains Python code to automatically [add free licenses][steamdb-free-packages] on Steam.
![Illustration cover][img-cover]
## Requirements
- Install the latest version of [Python 3.X][python-download-url].
- Install the required packages:```bash
pip install -r requirements.txt
```- Install [ArchiSteamFarm][github-ASF] (ASF).
- Make sure that [IPC][wiki-ASF-IPC] is toggled ON. This is the default value.## Data
To retrieve a list of appIDs which are already tied to your account,
here are a few methods.1. /dynamicstore/userdata
The variable `rgOwnedApps` in the JSON data returned by
the [`/dynamicstore/userdata`][steam-userdata-endpoint] endpoint is
a large yet non-exhaustive list of appIDs owned by your account.
More information can be found on [this unofficial wiki][steam-userdata-wiki].**NB:** you have to be **authenticated** on Steam in your web-browser in order to use this method.
---
2. steamctl apps list
[`steamctl`][steamctl-github] is a Python package [available on PyPI][steamctl-pypi].
It allows to print to the terminal
the exhaustive list of appIDs owned by your account.```bash
pip install pipx
pipx install steamctl
``````bash
steamctl apps list
```The output should be formatted as follows: `{appID} {appName}`.
```
[...]
1667640 Imagined Leviathans Demo
1667710 Gladihaters Demo
1667730 Forgotten Journey
1667770 Samurai Shampoo
1667810 Riding Seas Demo
[...]
```**NB:** you have to be **authenticated** on Steam with `steamctl` in order to use this method.
---
3. /games/?tab=all
**Caveat:** I recommend **not** to use this procedure
because the list of appIDs is not **exhaustive** ,
e.g. demos are missing.A procedure built into the script
at [`Luois45`][luois45-gpl-repository]
parses a list of appIDs from
the [`/games/?tab=all`][steam-tab-all] web-page.**NB:** the "game details" part of your Steam profile have to be public in order to use this method.
---
4. /account/licenses/
**Caveat:** I recommend **not** to use this procedure
because this retrieves **subIDs** instead of appIDs.[Instructions][steam-account-licenses-instructions]
at [`Luois45`][luois45-gpl-repository]
suggest to execute JavaScript code in your browser
on the [`/account/licenses/`][steam-account-licenses] web-page.**NB:** you have to be **authenticated** on Steam in your web-browser in order to use this method.
---
Because it is the only method which returns an **exhaustive** list, the recommended method is:
```bash
pip install pipx
pipx install git+https://github.com/woctezuma/steamctl.git@67-fix-charmap
steamctl apps list > data/steamctl_output.txt
```## Usage
```bash
python add_free_licenses.py
```## References
- A [Github issue][luois45-appid-issue] which describes some attempts to retrieve owned appIDs,
- [`Luois45/claim-free-steam-packages`][luois45-gpl-repository]: a tracker of free licenses on Steam,
- [`woctezuma/steam-next-fest`][steam-next-fest]: a previous project of mine which makes use of ASF IPC,
- A [Steam guide][steam-guide-no-cost] listing all of the free licenses which increment the library count.[steamdb-free-packages]:
[img-cover]:
[python-download-url]:
[github-ASF]:
[asf-free-citrinate]:
[wiki-ASF-IPC]:
[steam-userdata-endpoint]:
[steam-userdata-wiki]:
[steamctl-github]:
[steamctl-pypi]:
[steam-tab-all]:
[steam-account-licenses-instructions]:
[steam-account-licenses]:
[luois45-appid-issue]:
[luois45-gpl-repository]:
[steam-next-fest]:
[steam-guide-no-cost]: