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 Fri 29 Jul 2016, 17:56
All times are UTC - 4
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Business
Puppy now has a home-grown weather forecast utility!
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 4 [46 Posts]   Goto page: 1, 2, 3, 4 Next
Author Message
musher0


Joined: 04 Jan 2009
Posts: 8164
Location: Gatineau (Qc), Canada

PostPosted: Mon 18 Jul 2016, 21:54    Post subject:  Puppy now has a home-grown weather forecast utility!  

Hello all!

As the title says: "Puppy now has a home-grown weather forecast utility!" Smile

This home-grown utility is intended to be useful to travelers and business people,
but also to regular users who wish to follow the weather in their vicinity.

Many thanks are due to the contributors, "ideamen" Wink and testers on this project:
Argolance, gcmartin, Médor, pelo, Pete and vovchik. (Also me, but I don't count!)
Smile

Please see here. The description in English is past the middle of the post.

We feel we have a very efficient beta at present, and we're considering the
finishing touches. Any constructive suggestion is welcome, this is your chance if
you have ideas on the subject.

Enjoy! Very Happy

_________________
musher0
~~~~~~~~~~
"The greatest of minds are the ones that never close." | "Les plus grands esprits sont ceux qui ne se ferment jamais."
(starhawk, Resident Philosopher | philosophe en résidence) Wink
Back to top
View user's profile Send private message Visit poster's website 
davids45


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

PostPosted: Tue 19 Jul 2016, 19:58    Post subject: Historical Average Temperatures?
Subject description: For the climate change sceptics and firebrands
 

G'jour musher0,

Listening to rain falling outside, I'm interested in your group effort. If only we had an App to control the weather - be active not passive Laughing !

But I'm not clear on what files are needed to run your package and where these are in your 18-page thread. Could you list these together for slow learners like me?

As you seem to be adding lots of weather details from various sources and places, I wondered if there is a data base for the historical average day-night or max-min temperatures for major cities or similar?
Winter here is running about 5 degrees "above average" at night (the overnight minimum) but only about 3 degrees warmer during the day (the maximum). These are real degrees (C) not fake (F) degrees Wink .

Quite nice...when it's not raining.

David S.
Back to top
View user's profile Send private message 
musher0


Joined: 04 Jan 2009
Posts: 8164
Location: Gatineau (Qc), Canada

PostPosted: Tue 19 Jul 2016, 21:10    Post subject:  

Hi Davids45.

Thanks for the nice comments.

Regarding how to get the script:
First, you need to download and install the pet archive of the complete less utility --
from here:
http://murga-linux.com/puppy/viewtopic.php?p=913475&sort=lastpost#913475
-- unless you've already installed it on your Puppy.

Second, you need to download and install the attached pet archive (please see
below) which contains the weather script proper. It is the latest version as of
today.

Any problems, please let me know.
~~~~~~~~

Regarding variations in temperature and so on here and there in the world:
to find answers to those questions, you may want to use a good Internet search
engine. I am NOT a weather expert. I am only an amateur Puppy developer!

In particular, wikipedia: I believe that its articles for each major city and/or
country offer a table of average rainfall and temperatures towards the bottom, before
the article notes and references.

BFN.
WorldWeather-2.7c9.pet
Description  Please use this one. A typo in the main script in the pet put here previously prevented
the update function from working properly. Sorry for the inconvenience.
pet

 Download 
Filename  WorldWeather-2.7c9.pet 
Filesize  124.73 KB 
Downloaded  17 Time(s) 

_________________
musher0
~~~~~~~~~~
"The greatest of minds are the ones that never close." | "Les plus grands esprits sont ceux qui ne se ferment jamais."
(starhawk, Resident Philosopher | philosophe en résidence) Wink
Back to top
View user's profile Send private message Visit poster's website 
davids45


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

PostPosted: Wed 20 Jul 2016, 21:10    Post subject: First try - Nothing displayed after location chosen?
Subject description: Still raining here a bit
 

G'jour musher0,

I've installed the pets you advised above in a DPup Wheezy (Full) .

The less.pet didn't have a .packages list so I hope it's there. There is a file in /usr/bin that looks like it is the main file for less.

The Weather icon is on my desktop and in the right click menu under Business.

Starting up by clicking the desktop icon, Weather-in-the-World looks OK - I navigate to Asia->Australasia->Sydney, the dialog box disappears, then nothing for a second or two, then the location selection menu re-appears.

Is something missing in what I'm doing?

David S.
Back to top
View user's profile Send private message 
musher0


Joined: 04 Jan 2009
Posts: 8164
Location: Gatineau (Qc), Canada

PostPosted: Wed 20 Jul 2016, 22:20    Post subject: Re: First try - Nothing displayed after location chosen?
Subject description: Still raining here a bit
 

davids45 wrote:
G'jour musher0,

I've installed the pets you advised above in a DPup Wheezy (Full) .

The less.pet didn't have a .packages list so I hope it's there. There is a file in /usr/bin that looks like it is the main file for less.

The Weather icon is on my desktop and in the right click menu under Business.

Starting up by clicking the desktop icon, Weather-in-the-World looks OK - I navigate to Asia->Australasia->Sydney, the dialog box disappears, then nothing for a second or two, then the location selection menu re-appears.

Is something missing in what I'm doing?

David S.
Hello David.

Thanks for the feedback. Feedbacks are always appreciated.

The location selection menu is supposed to re-appear after the data is displayed
in a panel such as the attached.


I thought I'd make the menu re-appear because travelers often want to compare
the weather at their destination with the weather in the city in which they are now.

Otherwise the user would have to click a second time on the program icon or
worse go through the entire jwm menu to get a weather report for another city.

I understand your comment as :
"The weather report for Sydney, Australia, is not being displayed at all. The menu
just recycles on itself when the user clicks on the word 'Sydney' in the menu."
Is my understanding correct?

Thanks in advance for this additional information.

BFN
Sydney_Australia_2016-07-20.jpg
 Description   This is what I'm getting.
 Filesize   67.68 KB
 Viewed   203 Time(s)

Sydney_Australia_2016-07-20.jpg


_________________
musher0
~~~~~~~~~~
"The greatest of minds are the ones that never close." | "Les plus grands esprits sont ceux qui ne se ferment jamais."
(starhawk, Resident Philosopher | philosophe en résidence) Wink
Back to top
View user's profile Send private message Visit poster's website 
musher0


Joined: 04 Jan 2009
Posts: 8164
Location: Gatineau (Qc), Canada

PostPosted: Wed 20 Jul 2016, 22:44    Post subject:  

Hello again David.

If the weather report for Sydney is not showing, it may be because the wttr.in site
that provides the weather report is under heavy load at that particular moment. It
does not happen often, but it does.

The little team and I are working on providing fall-back data from an alternate site
in case the main site is overloaded. But that function is not quite ready yet.

In the meantime, if that happens, re-try half an hour later?

BFN.

_________________
musher0
~~~~~~~~~~
"The greatest of minds are the ones that never close." | "Les plus grands esprits sont ceux qui ne se ferment jamais."
(starhawk, Resident Philosopher | philosophe en résidence) Wink
Back to top
View user's profile Send private message Visit poster's website 
davids45


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

PostPosted: Thu 21 Jul 2016, 02:45    Post subject: More of a Less problem?
Subject description: less.pet won't install in Vivid Pup
 

G'jour/G'day musher0,
(Trying to be bi-lingual for you, in an Australian way Wink )

I happened to be in a Frugal Vivid Pup when I logged on to see you'd replied (twice).
So I tried installing the two .pets in this VividPup but only got as far as a failure to install the less pet.
Does the screen shot from Vivid help?

I was concerned with no root/.package files showing for less in my first test in a Full Wheezy. Maybe pemasu's Dpup Wheezy didn't display the Vivid message but likewise it did not install less.
Is less the package that does the graphics after selecting the location?
In Wheezy, I'd seen the dialog boxes to pick a place but, as you suspected in your first reply today, I see no reports for Sydney, or anywhere (I had tried Auckland then Ottawa, with the same no-report).

David S.
capture4220.png
 Description   
 Filesize   10.17 KB
 Viewed   182 Time(s)

capture4220.png

Back to top
View user's profile Send private message 
drunkjedi


Joined: 24 May 2015
Posts: 177

PostPosted: Thu 21 Jul 2016, 05:18    Post subject:  

try http://wttr.in/Sydney in a browser or in terminal
Code:
curl wttr.in/Sydney

just to check if that's working from your machine.
Then maybe look at that program.
Back to top
View user's profile Send private message 
ASD

Joined: 22 Mar 2016
Posts: 65

PostPosted: Thu 21 Jul 2016, 07:37    Post subject:  

I have had only limited success in properly understanding the output.

The first picture might represent "now" as of the most recent update, but if so, there is no indication of when last updated or how often updated. Also, sometimes the reading shows a range of temperatures.

Morning, Noon, Evening and Night might be consecutive six hour periods starting from 6 am?

When no rain (or, perhaps, an insignificant amount) is forecast why is the chance of that lack of precipitation always 0%?

My preference is for imperial, rather than metric, units and I did read this is easily done by adding ?u. As with
http://wttr.in/Sydney?u
Back to top
View user's profile Send private message 
musher0


Joined: 04 Jan 2009
Posts: 8164
Location: Gatineau (Qc), Canada

PostPosted: Thu 21 Jul 2016, 08:24    Post subject: Re: More of a Less problem?
Subject description: less.pet won't install in Vivid Pup
 

davids45 wrote:
G'jour/G'day musher0,
(Trying to be bi-lingual for you, in an Australian way Wink )

I happened to be in a Frugal Vivid Pup when I logged on to see you'd replied (twice).
So I tried installing the two .pets in this VividPup but only got as far as a failure to install the less pet.
Does the screen shot from Vivid help?

I was concerned with no root/.package files showing for less in my first test in a Full Wheezy. Maybe pemasu's Dpup Wheezy didn't display the Vivid message but likewise it did not install less.
Is less the package that does the graphics after selecting the location?
In Wheezy, I'd seen the dialog boxes to pick a place but, as you suspected in your first reply today, I see no reports for Sydney, or anywhere (I had tried Auckland then Ottawa, with the same no-report).

David S.
Hello David.

Your bilingualism attempt is much appreciated! Smile

And yes, your screen-shot from VividPup does help.

I just tried to download the less+lesspile pet from the forum and I also got the
substitution from the "+" character to the "%2B" expression. I'll have to ask our
moderator Flash why the forum does that.

The no-frills hands-on solution is to change back the "%2B" expression to a "+"
character once the file is downloaded on your machine, using the rename function
in the ROX-Filer or the mv utility in a terminal.

If you choose the terminal approach, it would be:
-- open a terminal in the directory where you downloaded the file
-- then type
Code:
mv -f less-481%2Blesspipe.pet less-481+lesspipe.pet
(Make sure there is a "+" but no "upper-case B" in the second file name.)

I just tried it on my Puppy with good result. I also clicked on the pet to install it,
and it didn't moan or screech! Smile

So that should do it. But as I said I have to ask Flash why the forum does that.
~~~~~~~

Less is not a graphic utility. It is a text reader with many features. Please see the
less FAQ for more or type
Code:
less --help

The way I use it in the script is to show the weather report after some processing
has been done to the curl download (drunkjedi's post above has the original curl
command).

The post-processing was necessary to be able to translate the original report into
French. But then I sort of backtracked, and realized that it might be useful to do
some post-processing on the original English text as well, such as adding the date
and hour when the report was taken.

That is essential, isn't !? Nobody wants a stale weather report! Smile

Finally, if we set aside any language processing, one advantage of showing the
weather report through less instead of having curl show it directly in a terminal is
that, in this way, the weather display becomes a quasi-GUI window.

It's almost seamless (IMO), it becomes pretty much like a regular program window.
To me that is a huge advantage over a regular terminal display -- the idea of which
is irritating and de-motivating for many users.

~~~~~~~
About the "no /root/.packages" for less, I don't really know why. My tentative
explanation would be that by default Puppy already has a stripped-down less utility
included in the busybox series of utilities. So it wouldn't be logging a less install in
the "packages registry" a 2nd time?

The "busybox less" was so stripped-down that it was next to useless for all but the
simplest purposes. I know some newer Puppies have dropped the busybox less
and are including an older version of the real less (v. 450, I think).

In any case, you can't go wrong downloading my suggested package: the less
utility shipping in it is the real one and also the latest (v. 481), from
greenwood software.
~~~~~~~

If you have any more snafus like this, please let me know?

Have a great day! BFN.

_________________
musher0
~~~~~~~~~~
"The greatest of minds are the ones that never close." | "Les plus grands esprits sont ceux qui ne se ferment jamais."
(starhawk, Resident Philosopher | philosophe en résidence) Wink
Back to top
View user's profile Send private message Visit poster's website 
musher0


Joined: 04 Jan 2009
Posts: 8164
Location: Gatineau (Qc), Canada

PostPosted: Thu 21 Jul 2016, 08:59    Post subject:  

ASD wrote:
I have had only limited success in properly understanding the output.

The first picture might represent "now" as of the most recent update, but if so, there is no indication of when last updated or how often updated. Also, sometimes the reading shows a range of temperatures.

Morning, Noon, Evening and Night might be consecutive six hour periods starting from 6 am?

When no rain (or, perhaps, an insignificant amount) is forecast why is the chance of that lack of precipitation always 0%?

My preference is for imperial, rather than metric, units and I did read this is easily done by adding ?u. As with
http://wttr.in/Sydney?u
Hello ASD.

Many thanks for your feedback.

If you are using the "Weather in the World" script, the top line should have a date
such as
Quote:
On jui 21 2016, 08 h 31
. Also, the report will refresh (update) automatically every four hours.

Or even less. For example, if the first report was taken at 8 h 59 a.m., it will
update automatically if you use the script again at 12 h 01 (one minute after noon).
So the weather report will be updated between 3 hours and 1 minute and a full 4
hours, as long as there is a difference of 4 between the hour of the last report and
the current time.

It is also updated automatically at the change of date, from one day to the next.
This day update trumps the hours update.
~~~~~~~~

I'll also see what I can do to present the user with a choice of metric or imperial
units in the script.
~~~~~~~~

For the rest of your comments, I must say that I have no control over what they
are referring to. The weather report proper is the work of the people at the wttr.in
site, namely Igor Chubin. My suggestion would be that you send those comments
to him.

That said, my understanding is that morning starts a 6 a.m. Noon should actually
read "Afternoon", from noon (the hour) until 6 p.m., and evening from 6 p.m. to
midnight. The "night" is actually on the next day, from midnight to 6 the next
morning. So yes, in increments of 6 hours.

You say:
Quote:
When no rain (or, perhaps, an insignificant amount) is forecast why
is the chance of that lack of precipitation always 0%?
I believe that is standard weathermen jargon. I see it on some Internet weather
sites as "POP : 0%" (POP being "Probability Of Precipitation").

I hope this helps. Bye for now.

_________________
musher0
~~~~~~~~~~
"The greatest of minds are the ones that never close." | "Les plus grands esprits sont ceux qui ne se ferment jamais."
(starhawk, Resident Philosopher | philosophe en résidence) Wink
Back to top
View user's profile Send private message Visit poster's website 
drunkjedi


Joined: 24 May 2015
Posts: 177

PostPosted: Thu 21 Jul 2016, 12:52    Post subject:  

Hi musher,
When I posted that comment I was at work and checked in Mobile's chrome browser and curl in terminal app (yup my mobile is rooted and has terminal on it. lol)

Anyway browser method was working.
But curl gave error. (curl: (6) Couldn't resolve host 'wttr.in')

Now at home on tahr64 and in chrome and also in terminal for curl gives only one word as output "Error".
I checked in mobile again and browser method was working. curl gave same error again.

What's happening?
Any Idea?

And yes your app on tahr64 shows menu again without showing weather.
But I don't think anything is wrong with your app.
Need to find root cause of it giving error in browser and in terminal.
Back to top
View user's profile Send private message 
musher0


Joined: 04 Jan 2009
Posts: 8164
Location: Gatineau (Qc), Canada

PostPosted: Thu 21 Jul 2016, 19:42    Post subject:  

Hi, drunkjedi.

Well, I just got these three reports from different parts of the world, even Sydney,
Australia. It's 19:05 hrs right now, Ottawa/Gatineau time (EDT). I'm thinking that if
someone from the other side of the world can get the weather for Sydney, someone
local should get the report too.

My experience is that the site hung on me 4-5 times when I was testing it
intensively (while building the cities menu). It sounds as though the site has a
mechanism to filter out compulsive use? Just guessing, but it would make sense.

Also late at night Ottawa time sometimes I get an error or nothing at all. I try again
five minutes later and it's ok. Beats me; this one I can't explain.

Or perhaps... Midnight here means six in the morning in Europe. Almost all
countries in Europe have the same time zone. On the one hand, there are 450
millions Europeans trying to get the weather at the same time when they wake up
and on the other hand there's little old me on the other side of the Big Pond trying to
get tomorrow's weather before going to bed!

It's an exaggeration of course, but I'm sure you're getting my meaning!

BFN.
~~~~~~~~~~~~
Transl. of the "weather now" legends in the screen capture below: cloudy in
Gatineau, light rain in Cape Town and sunny in Sydney.

Moral of this story: at the time of this writing, the wttr.in site is up and the script is
working.

What more can I say? If there are thousands of people querying what looks like a
rather small site, at the same time, I'm willing to be understanding if the site fails to
respond every now and then.
Three-reports_2016-07-21.jpg
 Description   Weather reports for Gatineau, Canada, Cape Town, South Africa, and Sydney,
Australia obtained whithin seconds of each other around 19:00 today Ottawa time (EDT). (Please pardon my French!) ;)
 Filesize   45.21 KB
 Viewed   94 Time(s)

Three-reports_2016-07-21.jpg


_________________
musher0
~~~~~~~~~~
"The greatest of minds are the ones that never close." | "Les plus grands esprits sont ceux qui ne se ferment jamais."
(starhawk, Resident Philosopher | philosophe en résidence) Wink
Back to top
View user's profile Send private message Visit poster's website 
musher0


Joined: 04 Jan 2009
Posts: 8164
Location: Gatineau (Qc), Canada

PostPosted: Thu 21 Jul 2016, 20:15    Post subject:  

Double-check:
Sydney-Australia_2016-07-21.jpg
 Description   
 Filesize   65.66 KB
 Viewed   80 Time(s)

Sydney-Australia_2016-07-21.jpg


_________________
musher0
~~~~~~~~~~
"The greatest of minds are the ones that never close." | "Les plus grands esprits sont ceux qui ne se ferment jamais."
(starhawk, Resident Philosopher | philosophe en résidence) Wink
Back to top
View user's profile Send private message Visit poster's website 
davids45


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

PostPosted: Thu 21 Jul 2016, 20:21    Post subject: Now reporting from Sydney (Australia's, not Canada's)
Subject description: Agrees with view out window!
 

G'jour/day musher0,

Success Very Happy !
Renaming the less file to change the "%2B" expression to a "+" and then installing that has given me the weather in the Unicorn Frugal Pup I'm using at the moment.
I'll attempt an sfs combining the two pets so all my Frugals can share this package at boot-up.

A couple of comments (minor bugs?).
Each start-up of the report has a error message about a not-fully functioning terminal (see screenshot). Pressing return and the report then displays. This may be just this Unicorn Pup - I'll see with some more Pups but I thought I should mention it just in case it's not.

The second screenshot is the full weather display following pressing <Enter> after the error message.
I notice the wind direction 'icon' is being truncated by the next piece of text (the wind speed) - if you look closely at the third screen shot I hope you see the arrowhead for the north-easterly wind/breeze is being chopped; an easterly is cut to just a dash.

Thanks for your help.

David S.

[post-postscript: I see in your just-posted images, the wind direction arrows are just about "unchopped" so it is likely my terminal is at fault? Are all terminals "equal"?]
capture12362.png
 Description   
 Filesize   4.99 KB
 Viewed   82 Time(s)

capture12362.png

capture13771.png
 Description   
 Filesize   97.63 KB
 Viewed   82 Time(s)

capture13771.png

report_detail.png
 Description   
 Filesize   34.26 KB
 Viewed   83 Time(s)

report_detail.png

Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 4 [46 Posts]   Goto page: 1, 2, 3, 4 Next
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Business
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.1453s ][ Queries: 12 (0.0070s) ][ GZIP on ]