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

[Feature] OS-specific directories #33

Open
moonburnt opened this issue Jul 14, 2020 · 1 comment
Open

[Feature] OS-specific directories #33

moonburnt opened this issue Jul 14, 2020 · 1 comment

Comments

@moonburnt
Copy link

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: #31

@moonburnt
Copy link
Author

I mean - I can make a proper commit, once #31 will be solved, but not before, since it just wont work yet

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

1 participant