gogrepoc
gogrepoc copied to clipboard
[Feature] OS-specific directories
Suggestion: instead of storing everything in the same directory as script, make use of OS-specific directories that serve for that purpose. For example, on linux it would be something like that:
- "$HOME/.config/gogrepo/" for cookies and manifest
- "$HOME/.local/share/gogrepo/" for downloaded games
- "$HOME/.cache/gogrepo/" for downloading_dir, resume_manifest, netscape_cookies_tmp
Dirty example of how that may be achieved (covering just linux, but it can be adjusted - I just dont know the correct paths on windows and mac):
In imports:
from os.path import expanduser
In # filepath constants:
https://gist.github.com/moonburnt/275c67519d055f01afebf9a72fcc9d5f
In main:
https://gist.github.com/moonburnt/9e3b54d4290b046e83e9755b8f75cc2c
I've tested it and it works for everything but finished downloads - more about this bug there: https://github.com/Kalanyr/gogrepoc/issues/31
I mean - I can make a proper commit, once #31 will be solved, but not before, since it just wont work yet