Lyle-Tafoya / Steam-Categorizer

Automatically generate categories for games in your Steam library
GNU General Public License v3.0
25 stars 2 forks source link

Reduce number of required options #8

Closed Theo47 closed 7 years ago

Theo47 commented 8 years ago

Some recommendations to minimize the number of options the user needs to provide.

  1. --key: You could consider parsing the owned game list from localconfig.vdf instead to remove the need for providing an api key.
  2. --id: Apparently if you get the bolded part of the path to sharedconfig.vdf (/home/my_username/.steam/steam/userdata/65357252/7/remote/sharedconfig.vdf) and add 0x0110000100000000 to it, you end up with the ID64. You could use that instead of asking the user to provide an id too.
  3. --config: If the user provided an id then you can do the opposite here. I am not sure what the process is for converting Steam Id to Steam ID64 but after you do that you can substract 0x0110000100000000 from it to get the number you need for the path. For the path to steam you can try checking if it is located to the default install path. For windows it is "C:\Program Files\Steam" or "C:\Program Files (x86)\Steam" depending or whether the system is 32-bit or 64-bit. I don't know what the default install path for linux and macos is but a google search would probably provide you with that. You could also add a --path-to-steam option for the cases where steam isn't installed on the default path.
  4. --output: You could probably set a default for this to be the same as --config if you haven't already done so. You could also have it create a backup before overwriting the file if you are worried for errors.
  5. --preferences: You could add a default path for this too if you haven't done so already. For windows it would probably be the location the program was run from. I can't speak for linux.
  6. --birthdate: I assume in this case we only care about one thing. Whether we pass the age check or not. The actual birthdate is not that important and i assume most people don't know their birthdate in epoch date and would just use "-b 0" anyway. So maybe just make one case the default and add an option for the other. As in make not bypassing age check the default and add a --bypass-age-check option or the opposite. Personally i'd prefer the latter.
Lyle-Tafoya commented 8 years ago

These are some great suggestions. I will do my best to implement them. Thank you for taking the time to provide your input. It is very valuable to me, especially during these early stages of development.

Lyle-Tafoya commented 8 years ago

Just to clarify some things:

Theo47 commented 8 years ago
Theo47 commented 8 years ago

Took a look at the code and turns out it is more complex than what i thought when i suggested it.

It reads from the "Licenses" section of localconfig.vdf. But that contains package ids not game ids. A package may contain more than 1 games as well as dlcs. You can take a look at 340 and 49800 to better see what that means.

It then reads from steam/appcache/packageinfo.vdf using a binary reader to get the packageid to gameid conversions.

Finally it filters out all dlcs. I think it does so by reading from a third local file to get the app type of each gameid but i didn't actually check.

I guess reading from https://steamcommunity.com/id/user_name/games would be easier to implement.

Lyle-Tafoya commented 8 years ago

I may consider following that same process, in order to keep as much work done offline as possible. However, that may be more of a long term goal since I have already determined how to parse the steamcommunity games page and have added logic to my development branch to skip over "Downloadable Content" titles whenever I am parsing the store page for them.

If there is a way to determine whether a game is downloadable content offline, I may look into that. I have plans to do a little research on all the Steam .vdf files to determine what their potential usefulness may be to this project.

Lyle-Tafoya commented 7 years ago

This issue is solved as of v0.5.0 97d799fc1298671cf43530dd9dec8506c62b31e4 The sharedconfig.vdf file and steam url name can be loaded from a preferences file The following options have been removed completely: --key, --id, --output, --birthdate