tralph3 / Steam-Metadata-Editor

An easy to use GUI that edits the metadata of your Steam Apps
GNU General Public License v3.0
161 stars 18 forks source link

Create/update modification.json from cli parameters #6

Closed NathanaelA closed 2 years ago

NathanaelA commented 2 years ago

This is like #5 other than I want to have it be "targeted" to a single game id. I'd like to be able to do something like steammetadataeditor -m <steamid> and it would create both the original & modified section in the modification.json file just like it does now when you make a change and click the save button. Then I can use something like jq to make the changes to the json, and finally do a steammetadataeditor -s to apply them.

My objective would be:

This would be very useful because certain games on linux the showcdkeyonlaunch creates a issue where the game can't run. So if I can easily script a script to export out any of the games that I'm having this issue and the dlc (as the dlc with this flag will also cause the exact same issue). And then have jq make all the changes, then I could have a simple script: fix_steam_game <id> and it would apply this fix to everything.

So the only feature that is really missing in this whole thing is the cli export of a game entry...

tralph3 commented 2 years ago

Ah that shouldn't be hard to do. If I have some time later today I might add it. Thanks for the suggestion!

tralph3 commented 2 years ago

I just pushed an update that should let you do what you want. Just pass the -e argument with the list of appIDs you want exported and it should do the job.

steammetadaeditor -e 3123 13545 1223415 4323

Please tell me if it has issues.

mirh commented 1 year ago

What if there was some reg.exe-like syntax for manipulations from cli? E.g. REG QUERY, REG ADD and REG DELETE.

tralph3 commented 1 year ago

I had planned to overhaul the program and it would allow for such a thing by passing json's as arguments. There's no ETA on that tho.

mirh commented 1 year ago

Passing files seems far more involved and less immediate than what I was suggesting (even though sure, it has its occasions). steammetadaeditor [-a|add] 3123 showcdkeyonlaunch 0 seems as easy as you could get instead.

tralph3 commented 1 year ago

That alone wouldn't work. How do we know where to drop that key? You would need to provide the full structure of the metadata.

Maybe we can separate each key by dots or something? So:

steammetadaeditor [-a|add] 3123 common.showcdkeyonlaunch 0
mirh commented 1 year ago

Oh, I see sorry. I didn't think there were "parallel sub-sections". That works for me (and it may even make for more clarity when you tinker with stuff outside of appinfo.vdf)