| 1 | #generated by chatgpt |
| 2 | import vdf |
| 3 | |
| 4 | def extract_launch_options(filepath): |
| 5 | with open(filepath, 'r', encoding='utf-8') as f: |
| 6 | data = vdf.load(f) |
| 7 | |
| 8 | results = [] |
| 9 | |
| 10 | def walk(node): |
| 11 | for key, val in node.items(): |
| 12 | if isinstance(val, dict): |
| 13 | if key.isdigit() and "LaunchOptions" in val: |
| 14 | print(f"[{key}] {val['LaunchOptions']}") |
| 15 | walk(val) |
| 16 | |
| 17 | walk(data) |
| 18 | return results |
| 19 | |
| 20 | if __name__ == "__main__": |
| 21 | import argparse |
| 22 | |
| 23 | parser = argparse.ArgumentParser("extract") |
| 24 | parser.add_argument("filepath", help="the path to the VDF file to extract") |
| 25 | args = parser.parse_args() |
| 26 | |
| 27 | extract_launch_options(args.filepath) |
jackz / Extract Steam Launch Options
Last active 4 months ago
Extracts LaunchOptions from steam, showing appid & options. python3 extract.py ~/.local/.steam/steam/userdata/#####/config/localconfig.vdf
Revision d586bbb9a005ed5ce5403f7b1cdc14a4db60a31a