-
Notifications
You must be signed in to change notification settings - Fork 990
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
Yahoo weather APIs EOL #1973
Comments
It would be straightforward to write a new segment using the OpenWeatherMap API but as far as I can tell this repo seems abandoned. I'd be willing to work on the segment if an admin could reply and confirm that the repo is active and that they'd be willing to merge it. |
We can start with a pull request to move the API, i'm available if you need more hands to code this... |
One more hand here if any help is need to migrate the API |
@gsusrafael For me, it's OK if we start right now :) |
i've forked the repo, i'm checking this info https://blog.rapidapi.com/access-global-weather-data-with-these-weather-apis/ to check our options for a Weather Info Gathering.... |
Just wanted to throw in https://wttr.in as another option, because of it's simplicity |
@liketechnik your suggestion is even better... i think could be a painless transition |
@liketechnik the only thing i'm still looking for in wttr.in is the posibility to dump the info in JSON... |
I'm not sure if this is possible with wttr.in :/ What I found in the Readme is the possibility of having custom formatting and returning the current weather in a single line (https://github.com/chubin/wttr.in#one-line-output) |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
that could be an interesting proposal for wttr.in, i've been looking into their
issues list and i've found some requests asking for JSON output format... that
could be really nice if this feature comes integrated on any further release of
wttr.in and then we could use it, but right now let's do something which could
be reusable and/or pluggable to any weather API provider.
On 2019-Mar-15 13:31:03, Florian Warzecha wrote:
I'm not sure if this is possible with wttr.in :/ What I found in the Readme is the possibility of having custom formatting and returning the current weather in a single line (https://github.com/chubin/wttr.in#one-line-output)
--
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub:
#1973 (comment)
- --
Jesus Rafael Sanchez
"Inter fractal umbras et illusionibus evanuit somnia ..."
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
iQIcBAEBAgAGBQJcjBAvAAoJEBKYkbOSUaVWlPwP/3tBQWeBbpxPjZ7N8YxCsIyr
/2F3Y1+OHViEosq6UOZu1SlTXZUB4tFb7Iu9/7Lf6xordPPAW/7S0c35/I9sTYgJ
dBuoi+rnNhTwVaisyu6Grl02mxTdItNlCI+SiZq36utuDEgUhCaUZa2NrRf3zT5h
341myYD3gwNvvj086z3nqorzV2usRF5N+RsajnP3q0EtmgceMcaCkFyaATrNJYVB
7r3UIO7DJgv0f+NZESSrAHHSXw0ni6PVdkh2CdQ9Qxfu8/7UFSw9jMBeXEG2vaAV
l4jEOZ6N9diN6kOYsgkcicE6bMFwx9g90HHM4/HakUCeTuOD2opFkMv/C05gIJ9f
nf5y9/KFkS2MN65Nl+F7A+HJ9JoW9kZ5b6uO034VDnckCvVpY5gLmPW9JTkEFs7g
0WnwAW8QJ+I9tZdhP/SDcoSgKVpOfpy0bG284PQ6IQpoKIp8ykndZF6V3xGVkV7x
ZlN1f6xzfLuYIIbg7ZHjJfEMGDzosM0mTERp8PHWcM2MKgnmmB+JrqvVSfufCqBe
0ZbJSe5QQvVR/saY0bn3vDf3bmFNr1vlr/YsJF64ODUGj1tel0vVeNLIywDkAr5Z
1SrCs+ii0uAM6XyrFskrIE3Gbct9KRCRSDX1EFvbRM5N0QM+ZTrolBRWfNE0MEN4
TWXs9vL+fMIE53L1vtgq
=u1tZ
-----END PGP SIGNATURE-----
|
https://github.com/USA-RedDragon/powerline/commit/352bf96335d0ebd63acc996316af94b1394c8595 Implemented crappy support for Wttr.in. Ideally, we'd use a more professional api that is configurable and more verbose, but this works as an "at a glance" weather feature. |
You are damn right... wttr.in doesn't fulfill the specs for a full weather
API
El dom., 17 de mar. de 2019 7:05 AM, Jacob McSwain <notifications@github.com>
escribió:
… ***@***.***
<USA-RedDragon/powerline@352bf96>
Implemented crappy support for Wttr.in. Ideally, we'd use a more
professional api that is configurable and more verbose, but this works as
an "at a glance" weather feature.
[image: Screen Shot 2019-03-17 at 6 05 06 AM]
<https://user-images.githubusercontent.com/13051767/54489483-b1efbf00-487a-11e9-8bf1-abd6372cc5df.png>
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1973 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AA39c7P7kL6gxIm7t0H1J4SP4ZPSXOnFks5vXiGRgaJpZM4Z1bYx>
.
|
Any update on this? |
it seems @gsusrafael @USA-RedDragon made some progress with wttr.in but after that I thing the guys are not working anymore in this issue ... |
Unfortunately it seems this repo isn't being actively maintained, last PR merge was back in Nov 11, 2018. |
Correct @CollinChaffin. I've been using it locally for some time but it's not a good API. I actually forgot about this, I'll look into it more today |
As it turns out the GeoIP service it uses is also shut down: https://geoip.nekudo.com/shutdown |
@USA-RedDragon please check using ifconfig.co or api.ipapi.com |
How's the status on this? If someone creates a PR, I'd be willing to merge it (conditioned on that it contains the necessary tests). Further, I'd consider removing the old segment if it doesn't work anymore (and apparently will never work again, as I understand it). |
if i'm not wrong we could use wttr.in and ifconfig.co as replacements for
IP and Weather API
Att.
==
Jesus Rafael Sanchez Medrano
"Life is a dream, of which all must wake up"
…On Thu, Sep 26, 2019 at 3:39 AM Philip Wellnitz ***@***.***> wrote:
How's the status on this? If someone creates a PR, I'd be willing to merge
it (conditioned on that it contains the necessary tests).
Further, I'd consider removing the old segment if it doesn't work anymore
(and apparently will never work again, as I understand it).
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1973?email_source=notifications&email_token=AAG7246IFIXXLINJLQZ7UUDQLRRKBA5CNFSM4GOVWYY2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD7UUENA#issuecomment-535380532>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAG72465C5JOTWA2YAL4P4LQLRRKBANCNFSM4GOVWYYQ>
.
|
Hi I just came to use powerline with tmux less than a week ago and absolutely love it. It was sad for me to find weather segment stops to work and the repostitory is not under active maintenance now. I did make an attempt last night, to modify class WeatherSegment(KwThreadedSegment):
interval = 600
url_trunk = "wttr.in/"
def __call__ (self, pl, update_first=True,
location_query="Santa Clara,California",
temp_coldest=30,
temp_hottest=100,
icons=None,
**kwargs):
self.location_query=location_query
self.temp_coldest=temp_coldest
self.temp_hottest=temp_hottest
super(KwThreadedSegment, self).__call__(self, pl, update_first,
location_query=location_query,
temp_coldest=temp_coldest,
temp_hottest=temp_hottest,
icons=icons,
**kwargs)
@staticmethod
def key(**kwargs):
return "default_query"
def compute_state(self, default_query):
url_loc = '+'.join(self.location_query.split())
url = url_trunk + url_loc + '?' + 'u&format="%c:%t"'
response = urllib_read(url.encode('utf-8'))
if not response:
self.error('Failed to get response')
return None
return response
def render_one(self, query_response, icons=None, unit='C', temp_format=None, temp_coldest=-30, temp_hottest=40, **kwargs):
if not query_response:
return None
icon,temp_string=query_response.split(':')
match = re.match(r'([+-]*\d+)', temp_string)
if match.group(1) is None:
self.error('Fail to get temperature')
return None
temp = int(match.group(1))
if temp <= self.temp_coldest:
gradient_level = 0
elif temp >= self.temp_hottest:
gradient_level = 100
else:
gradient_level = (temp - self.temp_coldest) * 100.0 / (self.temp_hottest - self.temp_coldest)
return [
{
'contents': icon + ' ',
'highlight_groups': ['weather'],
'divider_highlight_group': 'background:divider',
},
{
'contents': temp_string,
'highlight_groups': ['weather_temp_gradient', 'weather_temp', 'weather'],
'divider_highlight_group': 'background:divider',
'gradient_level': gradient_level,
},
] |
I'm doing some efforts in porting the weather plugin to OpenWeatherMap. |
Any updates on this? Is a shame that this doesn't seem to be active. The segment is still broken. I've switched to other projects on most of my computers, but I still have some Linux using powerline which this would be nice on. |
Well, my PR is still open |
I did not take any action regarding that PR, because you, @StopMotionCuber, wrote “This is not really ready for merging yet”, so I assumed that the PR was/is still WIP. |
Could we just get it merged and add some clarifying information in the documentation that an API key needs to be added? I get the concern about this being kind of hacky, but honestly this is better than the nothing we have right now. I'd be glad to help if there's anything missing you need help with @StopMotionCuber 😃 |
Oh, the only thing I'm missing on is time, but otherwise I can go on with this PR. |
Update on my PR: Otherwise I'm quite annoyed working on this issue with my new MacBook, as there seems to be some Ice Lake CPU Bug that is crashing PyCharm and/or macOS 😡 |
Fixed in #2038 |
Noticed that the weather segments disappeared, checked powerline log which contained
It seems that the URL powerline uses is no longer supported by Yahoo since
03/Jan:
For the record, here's the relevant section of the log
I couldn't find any issue describing this, apologies is it's duplicate.
The text was updated successfully, but these errors were encountered: