sonic2kk / steamtinkerlaunch

Linux wrapper tool for use with the Steam client for custom launch options and 3rd party programs
GNU General Public License v3.0
2.1k stars 70 forks source link

VDF Parsing: Add More VDF Parsing Functions #967

Closed sonic2kk closed 9 months ago

sonic2kk commented 9 months ago

This PR adds various new VDF parsing functions that we can use when manipulating VDF block values.


There are also some (temporary) examples to proof out how we can use these functions in some upcoming work, such as for setting/updating a Non-Steam Game App entry in localconfig.vdf to toggle whether the Steam Overlay should be enabled for a given app. There is also an example of updating/creating the user-collections value to mark a Non-Steam Game as hidden. In future, we should be able to use this to add a Non-Steam Game to a collection, once we are able to reliably get the list of collection IDs by name to write into this JSON block.


These functions are not really used yet outside of the debug scenarios in the code, but are a prerequisite to some upcoming work. They will allow us to do the following:


TODO:

sonic2kk commented 9 months ago

Version is bumped, shellcheck is green (apart from a couple of disables, one for a debug var and another for some style changes I didn't prioritise), and these functions shouldn't break any existing functionality. This should be ready to merge!

In future maybe we could add more logging, but I felt it was a bit too noisy for right now :-)