Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Tue 22 Jul 2014, 20:02
All times are UTC - 4
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Desktop
Yweather 0.1a - taskbar weather app
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 3 [34 Posts]   Goto page: 1, 2, 3 Next
Author Message
vovchik


Joined: 23 Oct 2006
Posts: 1285
Location: Ukraine

PostPosted: 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
Yweather-0.1a-Lucid.pet
Description 
pet

 Download 
Filename  Yweather-0.1a-Lucid.pet 
Filesize  41.43 KB 
Downloaded  457 Time(s) 
yweather.png
 Description   
 Filesize   49.01 KB
 Viewed   1564 Time(s)

yweather.png

yweather-0.1a-src.tar.gz
Description 
gz

 Download 
Filename  yweather-0.1a-src.tar.gz 
Filesize  6.39 KB 
Downloaded  382 Time(s) 

Last edited by vovchik on Mon 07 Jan 2013, 10:35; edited 1 time in total
Back to top
View user's profile Send private message 
666philb


Joined: 07 Feb 2010
Posts: 1626
Location: wales

PostPosted: 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
View user's profile Send private message 
seaside

Joined: 11 Apr 2007
Posts: 886

PostPosted: 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. Very Happy

Thanks for this very pleasing applet.

Best Regards,
s
Back to top
View user's profile Send private message 
ally


Joined: 19 May 2012
Posts: 835
Location: lincoln

PostPosted: Mon 07 Jan 2013, 15:21    Post subject:  

runs ok on slacko 5.3.3 too.....

Smile
Back to top
View user's profile Send private message Visit poster's website 
davids45


Joined: 26 Nov 2006
Posts: 627
Location: Chatswood, NSW

PostPosted: 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 ( Embarassed ) 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
View user's profile Send private message 
davids45


Joined: 26 Nov 2006
Posts: 627
Location: Chatswood, NSW

PostPosted: 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
View user's profile Send private message 
mavrothal


Joined: 24 Aug 2009
Posts: 1564

PostPosted: 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 Very Happy
Back to top
View user's profile Send private message 
vovchik


Joined: 23 Oct 2006
Posts: 1285
Location: Ukraine

PostPosted: 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
View user's profile Send private message 
mavrothal


Joined: 24 Aug 2009
Posts: 1564

PostPosted: 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 Very Happy
Back to top
View user's profile Send private message 
vovchik


Joined: 23 Oct 2006
Posts: 1285
Location: Ukraine

PostPosted: 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. Smile
Back to top
View user's profile Send private message 
nilsonmorales


Joined: 15 Apr 2011
Posts: 460
Location: El salvador

PostPosted: Wed 09 Jan 2013, 17:26    Post subject:  

works fine with passaggio( tint2 )puppy , just add sleep 4 in script startup for my country Smile have you NLS for spanish?
Back to top
View user's profile Send private message MSN Messenger 
vovchik


Joined: 23 Oct 2006
Posts: 1285
Location: Ukraine

PostPosted: Wed 09 Jan 2013, 17:56    Post subject:  

Estimado nilsonmorales,

Lamentablemente yo hablo solamente un poco de Español Sad 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
View user's profile Send private message 
tenochslb

Joined: 10 Jul 2010
Posts: 36
Location: Mexico

PostPosted: Thu 10 Jan 2013, 20:03    Post subject: spanish translation NOT COMPILED  

spanish translation sources
yweather3.png
 Description   
 Filesize   33.89 KB
 Viewed   1118 Time(s)

yweather3.png

yweatherspanish.tar.gz
Description 
gz

 Download 
Filename  yweatherspanish.tar.gz 
Filesize  5.34 KB 
Downloaded  221 Time(s) 

Last edited by tenochslb on Wed 16 Jan 2013, 09:46; edited 2 times in total
Back to top
View user's profile Send private message 
tenochslb

Joined: 10 Jul 2010
Posts: 36
Location: Mexico

PostPosted: 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
View user's profile Send private message 
Geoffrey


Joined: 30 May 2010
Posts: 1321
Location: Queensland Australia ɹǝpu∩uʍop

PostPosted: 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

_________________
Carolina: Recent Repository Additions
Create strikethrough text HERE
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 3 [34 Posts]   Goto page: 1, 2, 3 Next
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Desktop
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0882s ][ Queries: 13 (0.0115s) ][ GZIP on ]