JackWink/Weather

create a conf file of some kind

wxl opened this issue · 5 comments

wxl commented
$ git pull
$ cp weather.py ~/bin/
$ weather.py
this key does not exist

doh! forgot to change the key. would be nice to not have to think about it but to have it pull from a conf file, e.g. ~/.weatherrc

Good call, just pushed this, but I still need to update the readme.

If ~/.weatherrc doesn't exist, it will be created on first run. Should probably update the error message to explain how to add the API key as well.

wxl commented

worked great, thanks! btw this is kind of a separate issue but since you
already plan on editing the README i would suggest you change the
suggestion to rename weather.py to weather. at least on debian-based
distros, there's a command called weather that can be installed. typing
weather causes it to ask if you want to intall weather rather than
running weather.

Is this the case even after you've renamed it to weather? Or is the concern that a user may confuse the weather.py script with the debian-suggested weather script?

I'm planning on making the rename step optional, but this will effect how I'll write setup.py

wxl commented

actually today it acts differently. i don't know. ;) however, IF someone
has weather installed it may be an issue. assumedly whatever's first in
$PATH will likely be preferred, but who knows how a user's $PATH is set
up, not to mention whether (is that a pun? ☺) or not they even have
~/bin in their $PATH. that being said, it might make it better to
have it as a pip package since setup.py doesn't have an uninstall
option, but pip does. it will save you the trouble of having to write
an uninstall script that will take care of manually removing things.
indeed, going global may be more appropriate in the end. with the option
to go local, of course.

I've updated the README to reflect these changes so I'm closing this out for now.

As far as I understand it I'll still need a setup.py for pip, just a few additional files so pip does most the work. Also assuming you'd want to install it from PYPI and not this Github repo, I'll probably have to rename it, add some tests and do some cleanup still... I'll file separate tasks for these.

Hoping to get around to it this weekend