SteamGridDB / steam-rom-manager

The bulk game importer and artwork manager for Steam!
https://steamgriddb.github.io/steam-rom-manager/
GNU General Public License v3.0
1.91k stars 123 forks source link

[REQUEST] Programmatic configuration of settings and parsers #720

Open schradert opened 1 week ago

schradert commented 1 week ago

The minimum I would love to see supported is allowing the user to provide userSettings.json and userConfigurations.json files and having that just work. Beyond that, easing this workflow by bolstering the CLI with options to add, edit, and remove parsers and other settings, building off presets too or existing configurations, would be legendary.

I have attempted to do this, and noted the following:

  1. Providing my own userSettings.json under .config/steam-rom-manager/userData before running the program initially does appear to work correctly already!
  2. When I provide a valid userConfigurations.json file and boot up the GUI to see if it loads it correctly, it overwrites the configuration of userAccounts.specifiedAccounts and steamCategories to be []. When you change them in the interface and save, I don't see any errors on the command line or in the interface, but essentially it acts as if it doesn't save your changes. I'm having a hard time tracking down how and where this fails ultimately.
  3. This mostly only seems useful to me if the CLI can also be run without a graphical desktop session. In the end I want to be able to configure steam-rom-manager and add every game it matches to steam in a non-interactive terminal which can be run from a remote machine. It is currently impossible to run commands like steam-rom-manager list/add this way. I have attempted to prefix these commands with a virtual display manager in headless mode like xvfb-run, but still no luck yet (new territory for me).

Upvote & Fund

Fund with Polar

schradert commented 1 week ago

I made an attempt here but no parsers are successfully imported despite there being no errors. Maybe I am using the methods wrong?

Here is the example parser.json I am testing with:

{
  "parserType": "Manual",
  "configTitle": "Manual",
  "steamDirectory": "${steamdirglobal}",
  "romDirectory": "",
  "steamCategories": [],
  "executableArgs": "",
  "executableModifier": "",
  "startInDirectory": "",
  "titleModifier": "",
  "fetchControllerTemplatesButton": null,
  "removeControllersButton": null,
  "steamInputEnabled": "1",
  "imageProviders": [
    "sgdb",
    "steamCDN"
  ],
  "onlineImageQueries": [
    "${fuzzyTitle}"
  ],
  "imagePool": "",
  "drmProtect": false,
  "userAccounts": {
    "specifiedAccounts": [
      "Global"
    ]
  },
  "parserInputs": {
    "manualManifests": "/home/tristan/.config/steam-rom-manager/userData/manifests"
  },
  "executable": {
    "path": "",
    "shortcutPassthrough": false,
    "appendArgsToExecutable": false
  },
  "titleFromVariable": {
    "limitToGroups": [],
    "caseInsensitiveVariables": false,
    "skipFileIfVariableWasNotFound": false
  },
  "fuzzyMatch": {
    "replaceDiacritics": true,
    "removeCharacters": true,
    "removeBrackets": true
  },
  "controllers": {
    "ps4": null,
    "ps5": null,
    "ps5_edge": null,
    "xbox360": null,
    "xboxone": null,
    "xboxelite": null,
    "switch_joycon_left": null,
    "switch_joycon_right": null,
    "switch_pro": null,
    "neptune": null,
    "steamcontroller_gordon": null
  },
  "imageProviderAPIs": {
    "sgdb": {
      "nsfw": false,
      "humor": false,
      "styles": [],
      "stylesHero": [],
      "stylesLogo": [],
      "stylesIcon": [],
      "imageMotionTypes": [
        "static"
      ],
      "sizes": [],
      "sizesHero": [],
      "sizesTall": null,
      "sizesIcon": []
    }
  },
  "defaultImage": {
    "tall": "",
    "long": "",
    "hero": "",
    "logo": "",
    "icon": ""
  },
  "localImages": {
    "tall": "",
    "long": "",
    "hero": "",
    "logo": "",
    "icon": ""
  }
}