| Author |
Message |
vovchik

Joined: 23 Oct 2006 Posts: 1229 Location: Ukraine
|
Posted: Mon 07 Jan 2013, 10:15 Post subject:
Yweather 0.1a - taskbar weather app Subject description: uses Yahoo API for rather comprehensive report |
|
Dear puppians,
I just finished coding a little taskbar app that shows weather in the taskbar. You need to launch it with a valid WOEID (look up at http://woeid.rosselliot.co.nz/) and a system of units (either "c" for metric or "f" for English).
Example: yweather 551801 c
This will give you a report for Vienna, Austria. Left clicking updates the report and taskbar icon. Right clicking shows a menu and lets you quit. I have put two sample scripts in /usr/local/bin for New York City and Vienna which will show up in the Personal menu. Once you have selected your location, you can modify the desktop files in /usr/share/applications to reflect your preferred locations. You can also place the example scripts in your /root/Startup directory, so that the weather reports are available in your taskbar when you start your system (or restart X). Yweather relies on Yahoo's weather API.
I have attached a pet compiled in Lucid that should work in most recent puppies. The source (written in BaCon) is also attached. The binary, stripped and upx'd, weighs in at only 14k.
Have fun.
With kind regards,
vovchik
 |
| Description |
|

Download |
| Filename |
Yweather-0.1a-Lucid.pet |
| Filesize |
41.43 KB |
| Downloaded |
220 Time(s) |
| Description |
|
| Filesize |
49.01 KB |
| Viewed |
935 Time(s) |

|
| Description |
|

Download |
| Filename |
yweather-0.1a-src.tar.gz |
| Filesize |
6.39 KB |
| Downloaded |
158 Time(s) |
Last edited by vovchik on Mon 07 Jan 2013, 10:35; edited 1 time in total
|
|
Back to top
|
|
 |
666philb

Joined: 07 Feb 2010 Posts: 1217 Location: wales
|
Posted: Mon 07 Jan 2013, 10:34 Post subject:
|
|
nice little app ... thanks vovchik
_________________ Quickpet_Precise, install popular apps quickly http://www.murga-linux.com/puppy/viewtopic.php?t=83642
LÖVE2d, a collection of 27 lua gameshttp://www.murga-linux.com/puppy/viewtopic.php?t=76739
|
|
Back to top
|
|
 |
seaside
Joined: 11 Apr 2007 Posts: 832
|
Posted: Mon 07 Jan 2013, 12:36 Post subject:
|
|
vovchik,
What a handsome product. I tried it out on Puppy Precise 5.4.1 and it ran nicely.
It must be your new year's resolution, to see if you could meet the challenge of parsing all that xml data, and maintain a good humour.
Thanks for this very pleasing applet.
Best Regards,
s
|
|
Back to top
|
|
 |
ally

Joined: 19 May 2012 Posts: 344 Location: lincoln
|
Posted: Mon 07 Jan 2013, 15:21 Post subject:
|
|
runs ok on slacko 5.3.3 too.....
|
|
Back to top
|
|
 |
davids45

Joined: 26 Nov 2006 Posts: 580 Location: Chatswood, NSW
|
Posted: Mon 07 Jan 2013, 21:28 Post subject:
If only it could control the weather.... |
|
G'day vovchik,
As I sit here in Sydney waiting for the temperature outside to get to the forecast 43C, your task-bar weather app sounded interesting.
Running a Full Slacko-5.4 (4G so non-PAE), I downloaded and started up yweather in the console (yweather 1095024 c) but was told of a missing lib file -> libgobject-2.0.so
Accidentally copying the almost right file libgobject-2.0.so.0 to /usr/lib gave me a segmentation fault.
Copying the right file ( ) libgobject-2.0.so to /usr/lib and the app now works.
And it's only 37C..... so far.
Thanks,
David S.
|
|
Back to top
|
|
 |
davids45

Joined: 26 Nov 2006 Posts: 580 Location: Chatswood, NSW
|
Posted: Mon 07 Jan 2013, 22:50 Post subject:
Subject description: mouse clicks problem - Slacko, but not Exprimo (OK) |
|
G'day again vovchik,
I added a script to Startup to get yweather running at boot-up in Slacko-5.4, which it did.
But I can't get yweather to update with a left button click when the cursor is over the sun icon on the task-bar. The yweather display pop-up is for noon here (was 37C) but it is after 1pm now and it's gone past 39C outside (confirmed by the weather pwidget).
A mouse right-click on the sun icon just brings up the same noon-time weather details - no menu as suggested in the pop-up?
Just did the same thing (installed the .pet and set my location and metric preference from the console) in my Full Exprimo-5.x.?-3.6.2 and yweather worked first time - no missing libraries - and mouse-clicks show as promised. I then put the run-it-at-booting script in Startup and re-booting also displayed the now 42C temperature at 2.20pm, etc without problem.
How often does the Yahoo weather information update, by the way?
David S.
|
|
Back to top
|
|
 |
mavrothal

Joined: 24 Aug 2009 Posts: 1058
|
Posted: Tue 08 Jan 2013, 00:55 Post subject:
|
|
Dear vovchik,
Tried the pet in (a bit modified) precise 5.4.3 and although I get the tray icon OK, it renews and quits OK in left- and right-click, I can not get any text to display on hover. Terminal shows
| Code: | | (yweather:540): Gtk-WARNING **: Failed to set text from markup due to error parsing markup: Error on line 7 char 37: Element 'markup' was closed, but the currently open element is 'b' |
What do I miss?
Latter Looks like is something in the handling of Yahoo provided data for some locations. Tried another location and it behaves OK.
_________________ Kids all over the world go around with an XO laptop. They deserve one puppy (or many) too 
|
|
Back to top
|
|
 |
vovchik

Joined: 23 Oct 2006 Posts: 1229 Location: Ukraine
|
Posted: Tue 08 Jan 2013, 05:53 Post subject:
|
|
Dear mavrothal,
I also notice a few sites that gave the same result. I haven't yet checked out those xml files that I am receiving in any detail, but suspect that there is something dicey in the raw data where nothing displays and the terminal shows bad markup. I will look into that. Can you give me the woeid of the site that was bad? Yesterday, the Buenos Aires data showed normally. They day before, I got the kind of result you describe for your location. I think I can solve that problem by looking at the "bad" data and figuring out what might be "bad". For 99% of the WOEIDs I have tried, yweather does work, though.
With kind regards,
vovchik
|
|
Back to top
|
|
 |
mavrothal

Joined: 24 Aug 2009 Posts: 1058
|
Posted: Tue 08 Jan 2013, 15:41 Post subject:
|
|
| vovchik wrote: | | Can you give me the woeid of the site that was bad? |
Unfortunately no, because they are not "bad" anymore.
I have the sense that some "rare" locations may give "bad data" if the server does not have them handy/cached and needs to find/generate them on the spot.
_________________ Kids all over the world go around with an XO laptop. They deserve one puppy (or many) too 
|
|
Back to top
|
|
 |
vovchik

Joined: 23 Oct 2006 Posts: 1229 Location: Ukraine
|
Posted: Wed 09 Jan 2013, 06:32 Post subject:
|
|
Dear davids45,
I don't really know how often sites report their data to Yahoo, although I think it varies from location to location. the "Last weather update" line is the last update that Yahoo has.
With kind regards,
vovchik
PS. Grab the latest pet. In the help (right click), in the first version posted (and 8 downloads by then), I confused right and left click. I genuinely cannot distinguish between right, and left and have to look at my hands for a few seconds for that distinction to sink in.
|
|
Back to top
|
|
 |
nilsonmorales

Joined: 15 Apr 2011 Posts: 277 Location: El salvador
|
Posted: Wed 09 Jan 2013, 17:26 Post subject:
|
|
works fine with passaggio( tint2 )puppy , just add sleep 4 in script startup for my country have you NLS for spanish?
|
|
Back to top
|
|
 |
vovchik

Joined: 23 Oct 2006 Posts: 1229 Location: Ukraine
|
Posted: Wed 09 Jan 2013, 17:56 Post subject:
|
|
Estimado nilsonmorales,
Lamentablemente yo hablo solamente un poco de Español Si tu quieres hacer una traducción? Te podria ayudar a hacer una compilación en Español excepto que ahora no tengo ni el tiempo ni el conocimiento .
Atentamente,
vovchik
|
|
Back to top
|
|
 |
tenochslb
Joined: 10 Jul 2010 Posts: 34
|
Posted: Thu 10 Jan 2013, 20:03 Post subject:
spanish translation NOT COMPILED |
|
spanish translation sources
| Description |
|
| Filesize |
33.89 KB |
| Viewed |
520 Time(s) |

|
| Description |
|

Download |
| Filename |
yweatherspanish.tar.gz |
| Filesize |
5.34 KB |
| Downloaded |
91 Time(s) |
Last edited by tenochslb on Wed 16 Jan 2013, 09:46; edited 2 times in total
|
|
Back to top
|
|
 |
tenochslb
Joined: 10 Jul 2010 Posts: 34
|
Posted: Mon 14 Jan 2013, 07:55 Post subject:
|
|
Using wary 5.3
Compilation fails on line 1 when running 'bacon yweather.bac'
Parse error
|
|
Back to top
|
|
 |
Geoffrey

Joined: 30 May 2010 Posts: 919 Location: Queensland Australia ɹǝpu∩uʍop
|
Posted: Tue 15 Jan 2013, 23:08 Post subject:
|
|
This works in Carolina 005, though two symlinks need to be made | Code: | ln -s /usr/lib/libgobject-2.0.so.0.3200.1 /usr/lib/libgobject-2.0.so
ln -s /usr/lib/libgtk-x11-2.0.so.0.2400.8 /usr/lib/libgtk-x11-2.0.so |
_________________ AdobeAIR App Links: HERE
Carolina: Recent Repository Additions
|
|
Back to top
|
|
 |
|