Home Store Blog Development

Weathershow Applet


#1

With version 6.1-2, I was able to modify the cities file, in folder /usr/lib/budgie-desktop/plugins/budgie-weathershow and change one of the entries i.e. Oracle Junction US to Saddlebrooke AZ.

However, with version 6.2-20, If I do this same thing, the Applet displayed on the desktop always shows Apache Junction US.

I suspect you are not using the name in the cities file but using the Open Weather Map name. Any chance of changing this?


#2

I am not sure what you mean, nor what is happening on your side. We are using the names in the cities file. The line in the file containing “Apache” reads: 5551535 Apache Junction, Arizona, US (now including state info, which we fetched via an web API, added to the file).

Editing is very possible btw, see my city:

afbeelding

The line Apache Junction US isn’t in the cities file at all, so I cannot explain how you get the mention.
What is the output of grep Apache /usr/lib/budgie-desktop/plugins/budgie-weathershow/cities ?


#3

OK, tested on 19.04 using .8.0-0 on disco of weathershow Applet.

First off, with this version, there are a lot fewer cities, than the older versions For example, 5307464 Oracle Junction, Arizona, USA, that was in earlier versions, is no longer in this version.

So, I updated the cities file with 5307464 Saddlebrooke, Arizona, USA, log in/out. I then set the city in the applet configuration to Saddlebrooke, Arizona, USA. However, the display on the desktop shows Oracle Junction, US. Looks like the applet is using the 5307464 identifier and using the city from Open Weather Map.


#4

Hi makitso,
There were several reasons to switch the file, among those were: the “old” citylist was based on a deprecated list (now impossible to even get) from OWM. That old list had many duplicates, or multiple stations for one city. Furthermore, the list had no state info.
What we are using is the “official” list to be used by app developers, extended with state info. OWM’s web interface uses other data which is not available for us.
It is really impossible that you get data, other than what is in the file, simply because I know the applet is not fetching citydata from the internet.


#5

I can’t find saddlebrooke here https://openweathermap.org/city <-- that is the official web page for looking up weather areas


#6

Wait, I think I know what you mean. The weather data json file includes the cityname that comes with the code. You can edit the name in the file cities, which will show in Settings, but the cityname on the desktop is from the json file, fetched by the code.


#7

Bingo. Can you use the name from the cities file, like it was in 6.1-2 instead of the json file?


#8

Currently no, that would take a code change. I believe it was always like this btw, but I need to check. The old one was python.


#9

@fossfreedom – your absolutely correct, that city is not in Openweathermap.org/city.

But, the goal here was to change the local desktop name of an existing city in the city file to saddlebrooke. In reality, Saddlebrooke is about 3 miles from Oracle Junction. This whole thing was for cosmetics only.


#10

@fossfreedom

Another point. The cities file for the latest .8.0-0 version is missing some cities that are on the cities file from Openweathermap.org. IHMO, looks like someone arbitrarily deleted some – including Oracle Junction.


#11

You wouldn’t want the (sometimes long) names as a general rule btw:

Washington, D. C., District of Columbia, US

afbeelding

True, some cities are missing, but as said, the web interface list is simply not available to us. Most of the missing entries were exhaustive translations of the same city though.


#12

@vlijm - so, any chance of changing the applet to use the local cities name?


#13

Raised the enhancement request on github https://github.com/UbuntuBudgie/budgie-extras/issues/138