Giter Site home page Giter Site logo

librehat / com.librehat.yahooweather Goto Github PK

View Code? Open in Web Editor NEW
23.0 23.0 11.0 604 KB

[DEPRECATED] Yahoo! Weather Widget for Plasma Desktop

Home Page: https://www.kde-look.org/p/998912/

License: GNU General Public License v3.0

QML 71.06% Shell 4.90% Perl 17.73% CMake 1.70% JavaScript 4.61%

com.librehat.yahooweather's People

Contributors

amalvarenga avatar bubapl avatar bvbfan avatar kikadf avatar librehat avatar smitgd avatar vistaus avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

com.librehat.yahooweather's Issues

Add an option in settings to set icon style

Since we've had webfont in the package now, we can provide an option in settings to let user whether to use the built-in webfont, or use the desktop envrionment's icon set. A checkbox (boolean) is enough here.

does not take care of the clock settings

opensuse 42.2
kde environment
french language

clock settings : France, Paris , summer time/winter time

YW displays for example :

"Tue, 29 novembre 2016 08:00 CET" instead of "Tue, 29 novembre 2016 09:00"

Bad url?

Not sure if you are releasing the version at the commit "Mark new version" at fb0b5cb but the work-around url now in the code seems to be bad and can't be accessed: xml.weather.yahooapis.com
This one does work:
xml.weather.yahoo.com
-gene

Release

Hi!
I found the commits of 5.2.0 version. Do you plan 5.2.0 tarball?

console.debug() not printing in fedora fc23

Just a question, probably not a problem with weather app:
When I launch the weather widget with plasmashell or plasmawindowed I don't see any console.debug() outputs print with fedora 23. No problem doing same with debian. Is there a way to enable/disable console.debug() messages that might be turned off in fedora? Some suggested it is a compile option for the fedora build of QT vs. debian. Any ideas?
As a test work around, on fedora I have replaced console.debug with console.info so I can see the messages.

More units support

The new API returns wrong wind.chill (Feels like temperature) for Celsius. It's also nice for us to convert pressure, visibility, etc into different units independently.

Hence, the solution may be getting Fahrenheit temperature (along with distance in miles and so on) from Yahoo! and then do all the conversion ourselves in code. It also means more options in unit configuration!

Fix bugs regarding query retries, bad WOEID detection and 24-hr display

Note: Updated items 1 and 2 only since the descriptions were unclear. Described solutions have so far been rejected by project but work for me. Items 3-5 have been accepted and merged.

This is a list of various somewhat related bugs I have noticed and have fixed:

  1. Query fails don't display error message in widget. E.g., if network is down, after refresh only see circular busy indicator with no other hint as to the problem (no "Please check network" message appears). Proposal is to see busy indicator over the errstring message with retries continuing every 10 seconds in background. Also, show the errstring message only after about 5 retries (50 seconds) to avoid seeing the errstring (but still see busy indicator) after a reboot and during transient network drop-outs.
  2. With widget running OK and network up, if network then goes down, after a refresh, often "readyState" gets stuck at 1 and never goes to 4 (DONE). So, even with the proposed
    change in item 1, no errstring "check network" message appears in the widget no matter how long you wait. A solution is to start a 50 second timer each time readyState 1 is detected and when it triggers, abort() the current XMLHttpRequest and start another request/query. This always causes readyState 1 and then 4 to occur repeatedly so the errstring can be displayed (and, of course, when network restored, the busy indicator and errstring disappear and weather data appears, which is also the case for item 1).
    3. Typo at one place where resObj was "resOjb". Never executes so never saw runtime error.
    4. If good WOEID (2472005) changed to bad WOEID (247200566) a problem
    was not detected because query.count is 1 but still don't have a full
    response that can be parsed. Must do check to make sure when
    count is 1 that there is a actually a parsable response.
    5. Fix potential bug in new 24-hr display code. Problem not seen
    with current format from yahoo. Also, cleaned up 24-hr code and comments
    with no functional impact.

Few issues with units

  • readability issue: you should use empty space between number and unit - 16 km instead of 16km
  • label for pascal is Pa, not pa
  • you should really use hectopascals instead of pascals (or add hectopascals), it's more human readable (1 hPa = 100 Pa, eg. 101325 Pa = 1013,25 hPa)
  • in some countries (Bosnia and Herzegovina, Montenegro, Serbia, etc.) it is more custom to use millibars instead of pascals (1 mbar = 1 hPa = 100 Pa, eg. 101325 Pa = 1013,25 mbar = 1013,25 hPa), but adding just hectopascals should suffice (they'll figure out it's the same)
  • possibility of using 24-hour time for sunrise and sunset would be nice :)

I can do all of these (not sure anout the last one, though), so let me know if you agree with suggestions, I'll make a PR later. :)

weather-* icons changed on fedora update

On recent fedora update I noticed that the icons in the weather plasmoid changed to a more "abstract" appearance (e.g., the moon looked like the "death star" with strange clouds over it). This is because the icons for my selected theme "breeze" changed on the update, I think. To return to the more "realistic" icons I had to change my icon theme from "breeze" to "oxygen".
Maybe this is expected and known behaviour but I would prefer to see the "standard" weather-* icons inside the plasmoid regardless of the icon theme selected in KDE settings. It really surprised me when they changed. I don't see a way to "pin" the icon set to to the "standard" icons, which seem to be oxygen. The only reference I see for this is here:
http://www.notmart.org/index.php/Software/New_QML_components:_IconItem
and it indicates oxygen icons are used only as a last choice (unless oxygen icon theme selected).

Proposed change to add 24-hour time format

I am submitting a pull request that allows for optional selection of 24-hour time format. It is selected via a "check box" added to the "General" configuration screen (default, not selected, i.e., the 12 hour format returned by yahoo).
This affects the time fields in sunset and sunrise as well as the field that shows the time and date of the data from yahoo along the top. I did notice that the data for this field is "lastBuildData". This is actually only the date/time of the query response received from yahoo and is pretty meaningless since it just show the current date/time and does not show the date/time of the collection by yahoo of the latest weather data. A more meaningful field for this is "pubDate" that shows when weather data is actually updated. I took the liberty of using the more honest "pubDate" for this field instead. (Unfortunately, the pubDate is sometimes more then 1 hour behind the query time which explains the lag in the current temperature vs. the yahoo site.)

When installed on panel/tray, when icon clicked, some edge info is cut off.

tray
Also, some days of week run together.
It appears that the default width needs to be bigger. (Various translations also may have this problem, or worse or maybe not?)
I am assuming installation to panel is supported?
Ideally, the widget size should be adjustable via mouse when installed in panel, just like when installed on desktop. However, it does not seem to be.

Widget in tray does not show weather info until expanded (icon clicked)

When installed in panel/tray, after KDE log-in, icon "weather-clouds" always appears and the "tool tips" indicate (in English) "Yahoo! Weather Widget"/A Simple Weather Monitor" and does not show the real current conditions. However, once the tray icon is clicked and the full representation of the widget appears, after that the tray icon and tool tips do show the actual current conditions.
Clicking on the tray icon and showing the full widget should not be required for the icon and tool tips to show the real current conditions. They should just automatically appear at KDE log-in.
In addition, it would be nice for the tray icon to also include the current temperature.
These suggested changes are similar to the features of the more complex widget https://github.com/kotelnik/plasma-applet-weather-widget

Security error at zorbuth

When I use the link provided to obtain a woeid I can't get the woeid but only the message "Security Error!". Not sure if this is just a temporary error or something really broken or changed at the zorbuth site (maybe they now have a different url that uses https, but if I prepend https to the current url I only get 404).
If I do a google search on "woeid lookup" I find many other sites that successfully do the lookup.
I would recommend adding a note to the configuration page that a web search on "woeid" can also find other sites that do the lookup if or when the zorbuth site fails.

High cpu use

On my laptop, when there is no internet connection and the widgets show the spinning animation, the cpu use is very high (it reaches even 40% - i3-3110M CPU @ 2.40GHz).
Maybe is plasma fault, maybe is qt fault, i don't know, but would it be possible to insert a preference to disable the spinning animation and just show a static "refreshing..."?

Thanks and keep up the good work!

[Bug] Some widget value is different than the Yahoo! Weather page value

Hi!

I use 811659 WOEID, and when I control the value of widget with the Yahoo! Weather page, I look that some value is different in same time.

The temparature now: 16 C in widget, 19 C on webpage
Wind: 6 km/h in widget, 7 km/h on webpage
UV: 0 in widget (always), 1 on webpage

I use the last git version.

CMake Error at CMakeLists.txt

Failed to build the source code, error message:

`CMake Error at CMakeLists.txt:7 (find_package):
Could not find a package configuration file provided by "ECM" with any of
the following names:

ECMConfig.cmake
ecm-config.cmake

Add the installation prefix of "ECM" to CMAKE_PREFIX_PATH or set "ECM_DIR"
to a directory containing one of the above files. If "ECM" provides a
separate development package or SDK, be sure it has been installed.

-- Configuring incomplete, errors occurred!
See also "/home/ted/github/com.librehat.yahooweather/build/CMakeFiles/CMakeOutput.log".
`

uname -a Linux archlinux 4.13.3-1-ARCH #1 SMP PREEMPT Thu Sep 21 20:33:16 CEST 2017 x86_64 GNU/Linux

Auto-size text

The text on the widget should be auto-size, which is a new feature in Qt Quick 2.0

network connection error

opensuse 42.2
qt 5.6
you say qt must be >= 5.4

i want a localized french app.

i compile wihtout any problem app
i installed it with as recommended with "sudo make install"

i set the woeid to "580778" for Bordeaux,fr
then i wait a long time the i get an error
"erreur 1 vérifiez votre connexion" <=> "error 1 check your connection"

in a VM i installed opensuse 42.2 and i update to qt 5.7
then
no problem!

i don't want to update to qt 5.7 because i don't want to get some trouble with my 42.2

Fix i18n issue

Currently it doesn't load translations. Need to find out the new API/ABI in Plasma 5

If pressure unit is "Atmosphere" result always rounds to exactly 1

I think when atmospheric pressure express in "Atmosphere" it will range from slight below to slightly above 1.00. The current code does the correct conversion from mbar to atmospheres but rounds to nearest integer so the result is always 1.
In function mbarToAtm() need to change in last line from "k.toFixed(0)" to "k.toFixed(2)".

Yahoo Weather API retired

There's a notice here:

Important EOL Notice: As of Thursday, Jan. 3, 2019, the weather.yahooapis.com and query.yahooapis.com for Yahoo Weather API will be retired.
To continue using our free Yahoo Weather APIs, use https://weather-ydn-yql.media.yahoo.com/forecastrss. Contact [email protected] for credentials to onboard to this free Yahoo Weather API service.

Apparently Yahoo now requires a registered API key.

What does this mean for this plasmoid? Can you switch to another provider, like yr.no?

No weather icons shown

Hi,

I installed the yahooweather plasmoid from your git repository, and build it myself with cmake but no weather icons are shown.
Before that I tried to install it systemwide from the AUR Repository (I'm using manjaro) and via the plasma 5 Desktop to ~/.local/share. With all three installation methods I got the same results: weather infos are shown but no weather icons.
I tried to understand the source code where the icons come from, since there are no image files in the repository but I gave up.
I'm using WOEID 700186 and 24h format. What am I doing wrong?

Greetz,
conbart

Change forecast temperature separator from ~ to / and reverse temperature order

The separator between the hi and lo forecast temperatures, a tilde ("~"), looks somewhat like a minus ("-"). When the temperatures are negative (below zero) the display looks like this (extreme example with temperatures forced negative in the code):
original
I propose changing the separator to a slash ("/") which, I think, improves the display:
proposed
The change also shows a proposed change in the order to hi/lo. I checked several weather sites and apps and the forecasted high is always before (or above) the low.

Sunrise/Sunset time from yahoo has missing leading 0 when minute < 10

When the minutes in sunrise or sunset time arrive from yahoo is 0-9, the leading 0 is discarded and looks non-standard. E.g., should see "Sunset: 8:07 pm". Instead you see "Sunset: 8:7 pm". A fix-up function is need to handle this. I will post a pull request with a proposed fix that works for me.

[TODO] Port to Plasma 5

Port to Plasma 5 (Plasma Next).

This could enchance the widget by utilising Qt Quick 2.0. However, it also breaks the compatibility with KDE 4.x. (i'll create a branch to keep old code)

This work will begin when Plasma 5.2 is released.

Overlap panel icon and temperature values so used panel space is less.

Looking closer at the (overly) complex plasmoid https://github.com/kotelnik/plasma-applet-weather-widget I see that when it appears in the "system tray" the icon and temperature values somewhat overlap and take up much less space in the panel but still show the information clearly. I suggest that the yahoo plasmoid use a similar overlapping temperature/icon in the panel instead of the current side-by-side temperature and icon in the panel that requires a non-default wider space.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.