Yweather 0.1a - taskbar weather app

Window managers, icon programs, widgets, etc.
Message
Author
User avatar
8Geee
Posts: 2181
Joined: Mon 12 May 2008, 11:29
Location: N.E. USA

#46 Post by 8Geee »

A Pfind search on Slacko 5.7-nonpae finds

libgobject2.0.so.0 ---> copy this symlink, remove the .0
libgobject2.0.so.0.3200.4

Take the first symlink on the list, copy it, but edit the name WITHOUT the .0, then OK.
Linux user #498913 "Some people need to reimagine their thinking."
"Zuckerberg: a large city inhabited by mentally challenged people."

User avatar
Moat
Posts: 955
Joined: Tue 16 Jul 2013, 06:04
Location: Mid-mitten

#47 Post by Moat »

I hope vovchik doesn't mind... :oops:

As of a few days ago, Yahoo changed it's weather feed API, and now requires an authentication key. This broke Yweather.

Googling around, I managed to find an alternate Yahoo weather URL that still works;

Code: Select all

http://xml.weather.yahoo.com
I managed to re-compile Yweather with this new URL (using the source code from vovchik's first post), and it works again! 8) I also did a little editing of the Help text, in order to add some useful information without making the Help window too large.

Executable attached, for those whom are interested. Just remove the fake .tar.gz extension, right-click choose "permissions" and select "a+x (Make executable/searchable)", and use it to replace the yweather binary executable in /usr/local/bin - should work!

Being such a noob at compiling, the attached executable is huge in comparison to the original (87k vs. 14k) - but it's still quite small, so... no big matter (to me). Many here can do a much better job of compiling Yweather, no doubt. I did try vovchik's compiling options from this post - http://www.murga-linux.com/puppy/viewto ... 483#679483 - but ended up with a Yweather that wouldn't quit from the right-click menu. So I just stuck with this attached one, which appears to function fine.

Bob
Attachments
yweather.tar.gz
Remove fake .tar.gz extension
(86.11 KiB) Downloaded 288 times

musher0
Posts: 14629
Joined: Mon 05 Jan 2009, 00:54
Location: Gatineau (Qc), Canada

#48 Post by musher0 »

Good work, Moat! Great initiative!
I have my weather forecast again!

About the size: I stripped it like so:

Code: Select all

strip --strip-unneeded yweather
and it shaved 10k off it. Now down to 74K.

Also, vovchick said he upx'd it. So I did too.
Final result is attached: 20K!

I hope this helps.

BFN.
Attachments
yweather.zip
Unzip in /usr/local/bin or wherever you put yours, and make executable.
(18.87 KiB) Downloaded 270 times
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)

User avatar
Moat
Posts: 955
Joined: Tue 16 Jul 2013, 06:04
Location: Mid-mitten

#49 Post by Moat »

Excellent, musher0! :) Your zipped executable works a treat!

This noob will try those compile/compression options you mentioned, and see where it leads...

Thanks!

Bob

User avatar
Moat
Posts: 955
Joined: Tue 16 Jul 2013, 06:04
Location: Mid-mitten

#50 Post by Moat »

Moat wrote:This noob will try those compile/compression options you mentioned, and see where it leads...
Neato - I was able to shave mine down to 21k. That UPX is one powerful compression utility!

Bob

musher0
Posts: 14629
Joined: Mon 05 Jan 2009, 00:54
Location: Gatineau (Qc), Canada

#51 Post by musher0 »

Hi Bob.

Maybe you upx'd it with -9 instead of --best?
E.g.

Code: Select all

upx --best yweather
But no matter! What's a difference of 1k these days?!

Your new yweather app is still working fine after being up 3 hours.

I say this is a winner!

Thanks Bob!
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)

User avatar
Moat
Posts: 955
Joined: Tue 16 Jul 2013, 06:04
Location: Mid-mitten

#52 Post by Moat »

musher0 wrote:Maybe you upx'd it with -9 instead of --best?
Oh, if -9 was default, then yeah... I'm sure I did. :lol: :oops:

Got too excited and didn't even think about researching the options. :lol:

Silly noob, me...

Silly, anyways - installing a >1mb package (upx) to "save" a few dozen kb's. :lol:

All good fun, good learning!

Bob

User avatar
Semme
Posts: 8399
Joined: Sun 07 Aug 2011, 20:07
Location: World_Hub

#53 Post by Semme »

10kb pkg << Squash it Bob, Squash IT! :mrgreen:
>>> Living with the immediacy of death helps you sort out your priorities. It helps you live a life less trivial <<<

User avatar
Moat
Posts: 955
Joined: Tue 16 Jul 2013, 06:04
Location: Mid-mitten

#54 Post by Moat »

:lol:

Ok, then... where'd that hammer run off to...

:shock:

msgeo
Posts: 9
Joined: Mon 16 Aug 2010, 02:46
Location: Berlin
Contact:

#55 Post by msgeo »

Unfortunately, it does not work for Berlin. :-( (tahrpup 6.0.5, JWM 2.0, neither from the console).

Ähm ... now it works. :oops:

musher0
Posts: 14629
Joined: Mon 05 Jan 2009, 00:54
Location: Gatineau (Qc), Canada

#56 Post by musher0 »

Hello.

If your new yweather app edited by Moat seems to jam (not renew every hour),
here's how to un-jam it: close and re-open.

Code: Select all

#!/bin/sh
# /root/my-applications/bin/yweather-your-city.sh
####
[ "`pgrep -n yweather`" ] && kill -s 9 `pgrep -n yweather` || yweather <your-city-number-here> c &>/dev/null &
You can add this little script to some existing menu or create an icon for it on your
desktop or in any taskbar.

It's an on-and-off "switch": if you don't see the yweather icon in your taskbar, click
on the script one more time and you'll see it. Click once, the icon appears; click
once more, it closes; click another time, the icon appears again. Get it? :lol:

For Canadians: you can get a weather account at any time at
http://meteo.gc.ca/city/pages/ns-21_metric_f.html (in French)
http://weather.gc.ca/city/pages/ns-21_metric_e.html (in English)
This example is for Lunenburg, Nova Scotia. Just choose your own city and
the language that you want your report in at the top of the page.

Other countries have similar sites. E.g. for Switzerland. E.g. for the U.S.A.
You can leave that page open in your browser and view the changes in weather
as they are reported.

You don't need to log in to weather.com or meteomedia.com to get your weather
report. The above gov't agencies' sites are the "horse's mouth" where the
commercial sites get their info from, and they're public.

I hope this helps. BFN.
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)

msgeo
Posts: 9
Joined: Mon 16 Aug 2010, 02:46
Location: Berlin
Contact:

#57 Post by msgeo »

Thank you, musher0.

By the way, I found a site with very specific woeids of GeoPlanet, so I could get weather reports from little villages in Germany.

http://isithackday.com/geoplanet-explorer/
https://en.wikipedia.org/wiki/GeoPlanet

Martin

hw1
Posts: 2
Joined: Sun 11 Jun 2017, 20:00

#58 Post by hw1 »

I'm having trouble getting this to display anything. I start it from the console, and it appears to be running, but nothing gets displayed anywhere. Any idea what could be wrong or how to fix it?

edit: on playing around a bit, it seems that http://xml.weather.yahoo.com is not working. Perhaps this is why nothing happens.

User avatar
Moat
Posts: 955
Joined: Tue 16 Jul 2013, 06:04
Location: Mid-mitten

#59 Post by Moat »

Hi hw1 - welcome to the dog house!
hw1 wrote:...on playing around a bit, it seems that http://xml.weather.yahoo.com is not working. Perhaps this is why nothing happens.
Yep, correct - last year, Yahoo completely abandoned their open API for weather feeds, so this great little app is broken, and will likely remain so unless someone capable were to re-write the code using another weather feed supplier.

Yahoo bites!

Bob

hw1
Posts: 2
Joined: Sun 11 Jun 2017, 20:00

#60 Post by hw1 »

That's a shame. I guess I'll have to look around for an alternative.

Yahoo does suck, but I guess this is the first time in a long time that I remembered they even exist.

User avatar
Moat
Posts: 955
Joined: Tue 16 Jul 2013, 06:04
Location: Mid-mitten

#61 Post by Moat »

hw1 wrote:I guess I'll have to look around for an alternative.
pWidgets has a weather reporting widget or two that still work, I believe;

http://www.murga-linux.com/puppy/viewtopic.php?t=35601

If adventurous, finding a weather Conky on the 'net and tweaking it to work in Puppy is an option - but can take some time-consuming fiddling to get up and running. Some of the best weather Conky work is from the guys over at Bunsenlabs;

https://forums.bunsenlabs.org/viewtopic.php?id=189

Otherwise, I'm a fan of running LxPups (w/LxPanel) and X-pups (w/Xfce panel) - both of which have weather-reporting panel applets available.

HTH!

Bob

Post Reply