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

Improve CACHE dir handling, use XDG standard, fix whitespace and shebang #3

Merged
merged 6 commits into from
Dec 28, 2017

Conversation

MestreLion
Copy link
Contributor

The goal is to use ~/.cache/pokebase instead of current ~/.pokebase, to avoid further cluttering $HOME with hidden dirs. For backward-compatibility purposes if the old location already exists use it instead, so the change will affect only new installs.

The other changes are mostly cosmetic and improved security when handling directory creation.

Shebang lines are meant for executable scripts, not libraries that
are imported. Libraries should not have it as it could be misleading.
Besides, the recommended shebang for python is '#!/usr/bin/env python'
New default cache directory now respects XDG_CACHE_HOME, adhering to
the XDG Base Directory specification as described in
https://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html

In most systems this evaluates to ~/.cache/pokebase
@GregHilmes
Copy link
Collaborator

I wanted to let you know I've seen your PR, but I currently can't take an in-depth look at the code. I certainly will when I get the time to. Overall, it looks like you've made some handy-dandy improvements, thanks very much! I intend to merge sometime soon, again, once I get the time to look through it.

@MestreLion
Copy link
Contributor Author

No problem, take your time. Soon I'll post more PRs, mostly concerning encounters and improving performance. Btw, about encounters: what do you feel about a new "subresource" to handle things like Pokemon/123/encounters ?

@GregHilmes GregHilmes merged commit aa90a29 into PokeAPI:master Dec 28, 2017
@jrubinator
Copy link

Re: the subresource - I think I filed #10 for that.

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

Successfully merging this pull request may close these issues.

3 participants