Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert appinfo.vdf to json #5

Open
gitacct5 opened this issue Jul 4, 2021 · 3 comments
Open

Convert appinfo.vdf to json #5

gitacct5 opened this issue Jul 4, 2021 · 3 comments

Comments

@gitacct5
Copy link

gitacct5 commented Jul 4, 2021

Hello! Is there a way to convert the entire appinfo.vdf (not only the modified apps) to json format file? Thanks!

@tralph3
Copy link
Owner

tralph3 commented Jul 4, 2021

Yes, this is in fact what the program does. It converts everything to JSON (that's the tiny pause before it opens up) and all the modifications you make, and all the data you see are changed/fetched from this JSON.

However, this is stored in memory, it never gets written to a file. Only the parts of the JSON that were modified are written to a file.

I fail to see why would you want access to the entire JSON.

@gitacct5
Copy link
Author

gitacct5 commented Jul 4, 2021

I think having access to the entire JSON will allow searching (for certain keywords in apps' name, publisher name, tag, etc.) and batch renaming/replacing. This would be helpful if an app has tons of DLCs and a user wants to make changes to the app itself and all its DLCs. Just a thought...

@tralph3
Copy link
Owner

tralph3 commented Jul 4, 2021

I see.

There's a problem tho: If the program were to dump all the data into a JSON file, for you to edit and then load back, then the program would need to read all the data from the JSON and somehow identify what has been modified (you can't do this easily). That's why the modifications.json file contains only the modifications, so the program knows how to handle them.

When the program starts, it generates the JSON from the appinfo.vdf file, and then it replaces the game entries in the JSON with the data inside the modifications.json file. Having to essentially recreate the entire file, while doable, would be extremely inneficient for a tiny ammount of modifications.

I may think of way to group together applications with their DLC. If that info can be found in appinfo.vdf, then it should be possible to do. As for doing it massively, that may require more work, but I don't see a reason for it to not be possible. I would probably have to redesign some stuff tho.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants