bryanmr / Steamy_Cats

A Steam Game Category Sorter Written in Bash
GNU General Public License v3.0
17 stars 1 forks source link

Script exclusively runs in Offline mode #14

Closed RiderExMachina closed 5 years ago

RiderExMachina commented 5 years ago

On the latest build, even if the script can see my usernumber and pull down the Community Page, it'll run in offline mode.

I'll get some output a little later.

bryanmr commented 5 years ago

bryan@Ace:~/git/Steamy_Cats$ cat /var/tmp/Steamy_Cats/fragments/ Display all 1903 possibilities? (y or n)

I added an exit 1 above the bracket at the end for the community_profile function, on line 55.

It downloads the community profile games list (now working with redirects, thanks. :+1:) and creates the 1903 files I expect. You can add the exit 1 there on commit https://github.com/bryanmr/Steamy_Cats/commit/f077511428f229d6a66014b0afa9ea0d3857b380 and let me know if it doesn't create those files.

Edit: Forgot to mention, you have to add --debug to make it preserve the files most likely.

RiderExMachina commented 5 years ago

It looks like it does not:

 rider@BotW  ~/git/Steamy_Cats  ➦ f077511 ●  ./Steamy_Cats
We are using: [LINUX] <Username> :: 76561198058443459
Our config file is: /home/rider/.steam/steam/userdata/98177731/7/remote/sharedconfig.vdf
Downloading your community profile, if public, and then getting full list of games you own

 rider@BotW  ~/git/Steamy_Cats  ➦ f077511 ●   ls /var/tmp
newconfig.vdf
oldconfig.vdf
bryanmr commented 5 years ago

Did you add --debug to the command line switch? If there is no folder there, it is being deleted. There is a trap setup to delete the files on every exit not resulting from an error.

No matter what, the below are running: mkdir -p /var/tmp/Steamy_Cats/ /var/tmp/Steamy_Cats/fragments/ /var/tmp/Steamy_Cats/rewrites/ trap 'rm -rf "/var/tmp/Steamy_Cats/"' EXIT

bryanmr commented 5 years ago

Added more verbose output for errors, less verbose for successfully working: https://github.com/bryanmr/Steamy_Cats/commit/6496202770b90c3b9341fd7db8660ac6bfc0f78f

I had a bug in the ProtonDB code that was causing a problem.

RiderExMachina commented 5 years ago
 rider@BotW  ~/git/Steamy_Cats  ➦ 6496202  ./Steamy_Cats
We are using: [LINUX] <Username> :: 76561198058443459
Our config file is: /home/rider/.steam/steam/userdata/98177731/7/remote/sharedconfig.vdf
Downloading your community profile, if public, and then getting full list of games you own
Created 671 files :: Preserved configuration for 677 games.
Downloading files for these game IDs:  { {\
2 downloads started of 2 total
Downloads complete for the Store Frontend.
Most recent ProtonDB file appears to be: ./reports_jan1_2019.tar.gz
Adding new category tags to the games!
grep: /home/rider/.local/share/steam_store_frontend/{\.htmlgrep: /home/rider/.local/share/steam_store_frontend/{.html: No such file or directory
: No such file or directory
grep: /home/rider/.local/share/steam_store_frontend/{\.html: No such file or directory
grep: /home/rider/.local/share/steam_store_frontend/{.html: No such file or directory
grep: /home/rider/.local/share/steam_store_frontend/{\.html: No such file or directory
grep: /home/rider/.local/share/steam_store_frontend/{.html: No such file or directory
grep: /home/rider/.local/share/steam_store_frontend/{.html: No such file or directory
grep: /home/rider/.local/share/steam_store_frontend/{\.html: No such file or directory
Creating final configuration
Old config backed up to /var/tmp/oldconfig.vdf
New config written. To apply, run the below command:
cp /var/tmp/newconfig.vdf /home/rider/.steam/steam/userdata/98177731/7/remote/sharedconfig.vdf
 rider@BotW  ~/git/Steamy_Cats  ➦ 6496202  cat /usr/tmp/Steamy_Cats
cat: /usr/tmp/Steamy_Cats: No such file or directory

This bug is resolved, so I'll close this issue. I'll create a PR if I find out where the { and {[ are coming from.

bryanmr commented 5 years ago

I suspect the math is off on BEGIN_APPS or END_APPS. You could confirm this by running: --clear-whole-config : Preserves nothing from old configuration

If you don't get those errors, the problem is in the copy_config function and most likely present in the assemble_steam_config function as well. BEGIN_APPS is pretty straight forward, but your config has a different field order than mine which means the END_APPS logic is something I can't test robustly here.