Puppy now has a home-grown weather forecast utility!

Business software, financial software, etc.
Message
Author
musher0
Posts: 14629
Joined: Mon 05 Jan 2009, 00:54
Location: Gatineau (Qc), Canada

#41 Post by musher0 »

Thanks, ASD, for your reply.

The BBC weather site I was mentioning earlier is http://www.bbc.com/weather/.

~~~~~~~~~~~~~

You said above:
> I think you believe the time periods shown relate directly to the chosen
location. May I ask if you think this likely or certain?


I think it is "quite likely". I think that weather science will never be as precise as
physics or chemistry, so I will not use the word "certain".

I have observed that the closer I got to my location, the more exact the readings
were. When I asked for a weather report for the Gatineau airport 15 miles away
from my place, the results were indeed a bit "ballpark".

But the report reflected my weather quite accurately if I based it on my postal code
-- or better still, on the longitude and latitude of my location, as I explained to
davids45 above.

Forum member Geoffrey published a little utility called Locator 3.5 that will help you
pinpoint the longitude and latitude of your location. It's here.

Here is how to do it:
For the sake of argument, let's say that you want to know the current weather at
the Visitor Centre, on Signal Hill, next to the city of St. John's, Newfoundland and
Labrador, Canada.

Launch Geoffrey's Locator:
Type: "Signal Hill, Newfoundland, Canada" in the top box.
You are presented with a map.
Click anywhere on the map.
Your Internet browser will open with a bigger map of that location.
Locate the "visitor centre" on the map
Click on it

Now to the left, at the top of the same web page, a panel with the coordinates for
longitude and latitude of the visitor centre will be shown.
Highlight and copy those coordinates

Now in the weather menu:

Click on sub-menu "Favorites"
click on "Add an entry"
in the box that appears, on the last line, paste the coordinates you picked up above
hit return: the entry is saved.
Back to the menu, click on the last entry (which you have just created):
the weather report for the visitor centre on Signal Hill will be shown.

You can find the exact location of your home in this same way. You need to do this
only once, of course.

Afterwards, every time you click on the menu entry for those long./lat. coordinates,
you will get the weather report for your home location.

IHTH. BFN.
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)

User avatar
davids45
Posts: 1326
Joined: Sun 26 Nov 2006, 23:33
Location: Chatswood, NSW

Vetero - next test

#42 Post by davids45 »

G'jour/day musher0,

Thanks for the updated Vetero file.
I can now read the terminal text :D .

However, in Slacko-6.3.0, I did not have the meteo lib version (see screen shot of terminal window) so made a symlink to the older(?) version there and tried again.

No error message but still no new directory in /mnt/home (screenshot of post-tests /mnt/home and /usr/lib windows).

"Weather" still runs OK - can we have a single word name for the program, by the way? Sorry if there is already one that I've overlooked. I find "home-grown weather forecast utility" a bit like hard work to type with two fingers :oops: .

And can I select somewhere else to store the location choices - e.g. /mnt/sda5/Puppy_Archive/Vetero/ - as a single source for all Pups on this computer to use?

I'll do a quick test of copying the files in /var/tmp/ from this Slackopup to my data partition then symlinking these back to the Pup's /var/tmp to check this actually will work with the program. As I now have "weather" on several Pups, I'll then try sharing this same file(s) out to some others to check it still is OK this way.

Thanks again for all your work with this,

David S.
Attachments
fullscreen160729.png
(136.18 KiB) Downloaded 465 times
terminal_after.png
first try then trying after lib symlink
(187.2 KiB) Downloaded 451 times
meteo_mnt_home_after.png
(53.06 KiB) Downloaded 448 times

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

#43 Post by musher0 »

Hi David.

Thanks for testing once more.

~~~~~~~~~~~

For a short-hand of the main script, please try typing "meteo". "meteo" is a
symbolic link to the main script and it's already there.

~~~~~~~~~~~

Judging from the error message in your screen capture, I think you may have
tested the initial version of the "Vetero.sh" file. Please erase the old one and try
the new one instead.

In the new version of Vetero there would be a real human message telling you that
you are trying to copy something that's already there instead of the bland bash
error message you got.

I tested the new version of the swapping Vetero script many times, and it should be
working flawlessly. But of course my own horse could have blinders!

May I suggest that you try out the new version of the Vetero.sh swapping script
and report back? Thanks in advance.

~~~~~~~~~
As to your comment above:
< And can I select somewhere else to store the location choices - e.g.
/mnt/sda5/Puppy_Archive/Vetero/ - as a single source for all Pups on this
computer to use?


At this point, the Vetero script assumes that all the user's Puppies are located on
the same /mnt/home.

As you may know, /mnt/home is short-hand in Puppy for the main partition used by
the Puppy -- where the main Puppy sfs resides. /mnt/home can refer to
/mnt/sda1, /mnt/sdb2, /mnt/sdc3 or any partition.

All the user's Puppies may not be in the same /mnt/home -- /mnt/sda1, for
instance --, I realize that. But to be frank, I'm afraid that with my current limited
level of expertise in bash scripting, that's the best I can provide at this time.
Please accept my apologies if it causes any inconvenience.

That said, you're quite welcome to adapt the Vetero.sh data-swapping script
further -- in order to meet your own needs. (After all, that's the spirit of Open
Source, isn't!) :)

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

Pelo

Would'nt it be better in Personal category than in Business

#44 Post by Pelo »

Would'nt it be better in Personal category than in Business one ?
Computing wireless on the beach will not be possible at Marseillan, unless your laptop is waterproof !
Pet works on Slim Slacko (Xfce terminal)
Attachments
Thunder.jpg
Les éclairs clignotent, Well !
(66.31 KiB) Downloaded 428 times

User avatar
davids45
Posts: 1326
Joined: Sun 26 Nov 2006, 23:33
Location: Chatswood, NSW

One Weather report, many Pups sharing

#45 Post by davids45 »

G'day/jour musher0,

My profound apologies - I think I've been misleading you about the file I need to share around my Pups so they all have the same options for quick weather reports .

Having just tried symlinking from one Puppy to another via my data partition, I've found the critical file to share out my preferences for weather locations is not any in /var/tmp, but the English lst file in /usr/local/share/Listes_meteo/.

wttr.EN.lst holds the sites I have previously selected for 'personal' use as the entries at the end of the lst file. These appear on the menu when picking a place to display a weather report.

As a test, I created a few new places of interest to me running "weather" in a WheezyPup, and copied its modified wttr.EN.lst to my data partition (on sda5).
I started up a SlackoPup, re-named its existing wttr.EN.lst to wttr.EN.lst.OLD then made a symlink from the Wheezy-modified file on sda5 to Slacko's /usr/local/share/Listes_meteo/.

The screenshots show the /usr/local/share/Listes_meteo/ directory, one with the link target showing

Starting "weather" and the new places from Wheezy are there in my Slacko menu.

I will test this a bit more with other Pups, but what I should try is creating my own .pet and .sfs with a link built-in to the modified wttr.EN.lst on sda5, or just edit /usr/local/share/Listes_meteo/ each time I install "weather'.

At your suggestion, I ran meteo in a terminal and had the attached screenshot with a red flashing message.
Is this multiple terminal packages the cause of my delayed start with "weather"?
Where do I define which terminal to use - I'll have look.

Sorry again for misunderstanding the program,

David S.
Attachments
slacko_window.png
(23.41 KiB) Downloaded 436 times
slacko_window_linktosda5.png
(24.74 KiB) Downloaded 440 times
slacko_meteo.png
(9.33 KiB) Downloaded 409 times

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

#46 Post by musher0 »

Hi David.

In terminal, type

Code: Select all

meteo h
it will tell you the basics.

Get back to me if there are still hazy points.

~~~~~~~~~~
In short you type
meteo city type-of-terminal

Instead of the name of a city, you can use longitude and latitude coordinates, a
postal code, or an IATA airport code. But let's keep it simple for now.

Example

Code: Select all

meteo Cardiff 1
will show the weather for the city Cardiff, in Wales, using the minimalist st terminal
(in which the ANSI colors show nicely on black background with white type).

If you type

Code: Select all

meteo Cardiff 2
you'll get the same weather info for the same city. However it will be displayed
using urxvt, in basically two colors over a transparent background. A few of the
original colors may randomly seep through, but not all. For some reason (great
mystery, this; I have not figured out why), urxvt intercepts some of the ANSI colors.

IHTH. BFN.

~~~~~~~~~~
PS. I'll give some thought to the menu portability issue you mentioned.
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)

User avatar
davids45
Posts: 1326
Joined: Sun 26 Nov 2006, 23:33
Location: Chatswood, NSW

meteo h terminal results

#47 Post by davids45 »

G'day/jour musher0,

I installed your latest weather pet in a Full TahrPup-5.8.4. There was an earlier version already installed which I just left.

I ran meteo h in this Pup's terminal and first had a blue window of problems, followed quickly by a black background window that looked like the expected help window. Screenshots attached.

With my wrrt.EN.lst symlink from sda5 in place, I ran the weather program and there was no problem, apart from the initial message about my terminal configuration which required an <Enter> press..

David S.
Attachments
meteo_h_consolestart.png
(88.88 KiB) Downloaded 907 times
meteo_h_console2.png
(230.75 KiB) Downloaded 915 times

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

#48 Post by musher0 »

Hi David.

I installed 666philb's TahrPup-6.0.5 on this machine and guess what? I'm getting the
same warning you're getting before the litlle st terminal shows the weather report!!!
I think we better report this quirk to phil.

I also got the same error messages as you got when using the main urxvt terminal.
Which means the urxvt the TahrPup is using does not have the full complement of
perl libraries that it needs.

I double-checked and the $TERM variable is correctly set. So... Again, these
weirdnesses should be reported to phil in the TahrPup 605 thread.

In practice, if we just have to press the Enter key an extra time to get the report,
it's not so bad, is it?

For a minute there, you had me worried: I thought I had done something serious and
that the entire heavens were going to open and pour their contents on my head.
(Sorry for the bad humor!) :twisted: But as it turns out, it's not my script, it's some
quirk in the TahrPup.

I'm glad you found a way to get your personalized menu working, BTW.

BFN.
Attachments
Terminal_Warning.jpg
(10.77 KiB) Downloaded 862 times
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)

Pelo

For Ice-cream POS, or tan creams

#49 Post by Pelo »

Musher0, tu l'as mis en categorie 'business' pour les marchands de glaces, ou de crèmes à bronzer ?
T'as vu, en Business class, ya que moi qui répond, mais on a de la visite.
Attachments
Business.jpg
Pffee, nos businessmen n'ont pas de puppy. Les programmeurs, si !
(50.56 KiB) Downloaded 661 times

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

#50 Post by musher0 »

Hello all.

Please find attached a version 3.8b.

I only added the capacity to change the colors of the main title and underscores
from dark to light, and a call to the "GTK chtheme" utility if you find it necessary.

I kept it very simple because I didn't want to transform this weather script into an
art gallery or a fashion runway. There are only two color sets: bisque and snow for
dark GTK themes OR SaddleBrown and orange for light GTK themes. Of course
with some GTK themes, either color scheme will be fine.

I tested those colors a bit and they seem to fit in and maintain readability with
pretty much any theme. The color change can be controlled directly from the menu.
(Please see screen captures.)

It's sort of an on and off switch. From a terminal, simply type:

Code: Select all

meteo c
If you're not satisfied with the color result, do it again and the original colors will
be re-displayed.

I hope you'll enjoy these small changes. BFN.

~~~~~~~~~~~~
Due to forum attachments limitations, the pet archive has been split in two. To
reassemble the pet archive please type in terminal:

Code: Select all

cat WorldWeather-3.8b.xa?.pet > WorldWeather-3.8b.pet
and then to install click on WorldWeather-3.8b.pet.
Attachments
light-or-dark_2016-08-13(2).jpg
Light color scheme for main title and underscores.
(56.31 KiB) Downloaded 813 times
light-or-dark_2016-08-13(3).jpg
Dark color scheme for main title and underscores. Please note that the color of the
font and the font of the regular entries themselves are controlled by the GTK theme.
(51.55 KiB) Downloaded 811 times
WorldWeather-3.8b.xaa.pet
First part. Don't forget to reassemble the two parts, We install the reassembled pet, not its parts! ;)
(189.45 KiB) Downloaded 667 times
WorldWeather-3.8b.xab.pet
Second part
(189.45 KiB) Downloaded 637 times
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)

User avatar
vovchik
Posts: 1507
Joined: Tue 24 Oct 2006, 00:02
Location: Ukraine

#51 Post by vovchik »

Dear musher0,

Looks very good and, since I use a light theme, it works nicely. Thanks. :)

With kind regards,
vovchik

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

#52 Post by musher0 »

Hi, vovchik.

Thanks for the thanks! :) BFN.
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)

User avatar
davids45
Posts: 1326
Joined: Sun 26 Nov 2006, 23:33
Location: Chatswood, NSW

BIG weather in one Pup

#53 Post by davids45 »

G'day musher0,

Including your world-weather in most of my Pups (both Full & Frugal), I have had a strange response from just one version of TahrPup-6.0.2 where the terminal window that opens to display the weather report is bigger than the display.

All other Pups are "normal" where the terminal window takes up more than half the display but does not go 'off the edge' (see attached screenshots).

In every Pup, I still have to press <Enter> as I first get the message about the terminal set-up not being completely correct.

The over-size terminal window with over-size font has a red 'X' top left (see screenshot) but I don't know which program this is, so don't know if I can fix this problem with a config edit for this one terminal package (e.g. reduce the font size).

The over-size terminal appears as soon as I choose a location from the menu and get that terminal 'error' message - so it is not just too big when displaying the weather report itself.

With the demise of the weather-forecast widgets due to changes by yahoo and accuweather :cry: , your world-weather package is very useful as a desktop-clickable, stand-alone detailed weather report/forecast.

So I'm hoping there is a simple fix and explanation for this one-off behaviour.

If you need more information about this oddity, please ask.

Thanks,
David S.
Attachments
BIGweather.png
Over-size terminal display with weather in tahrpup-6.0.2
(59.8 KiB) Downloaded 715 times
normalWeather.png
normal terminal display in all other Pups
(196.38 KiB) Downloaded 698 times

mfb

#54 Post by mfb »

davids45,

At TahrPup-6.0.2 > Menu > Utility you may find “Urxvt Terminal Control (see Urxvt screen shot)" where you can make type size and other changes.

If “Urxvt Terminal Control
Attachments
Urxvt.png
(129.16 KiB) Downloaded 735 times
Output.png
(112.33 KiB) Downloaded 743 times
Last edited by mfb on Sun 30 Oct 2016, 10:02, edited 1 time in total.

User avatar
davids45
Posts: 1326
Joined: Sun 26 Nov 2006, 23:33
Location: Chatswood, NSW

#55 Post by davids45 »

G'day mfb,

Thanks for your reply to my query.

I'm interstate visiting grandchildren but when back in Sydney next week, I will try your suggestion to fix the problem with that Tahrpup on my desktop computer.

David S.

User avatar
greengeek
Posts: 5789
Joined: Tue 20 Jul 2010, 09:34
Location: Republic of Novo Zelande

#56 Post by greengeek »

OMG - fantastic musher! I really didn't expect it to work for my location (Auckland, NZ) but it did! And in colour! (although the colour doesn't show too well in my screenie) Haha, very clever. Only complaint is it thinks New Zealand is part of Asia - we are actually part of "Oceania". Nowhere near Asia. Small detail.

I will let you know if it gets the weather wrong and I get wet...
:-)
Attachments
Auckland_weather.jpg
(88.95 KiB) Downloaded 592 times

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

#57 Post by musher0 »

Hi guys.

Sorry for clocking in late, but this utility is not working anymore for me...

A "cobbler's son" tale perhaps, or maybe the webmaster decided to put my
url on the black list for testing his utility too frequently.

I have to see what's wrong up here before I can provide any insight on
the problems you are experiencing at this time.

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

User avatar
davids45
Posts: 1326
Joined: Sun 26 Nov 2006, 23:33
Location: Chatswood, NSW

Iterum mea culpa

#58 Post by davids45 »

G'day,

Thanks mfb for your post about my too-big problem but it was not the fix I needed.

I found the problem of the oversized terminal window with world weather was being caused by me (as usual :roll: ) - I had two versions of world-weather loaded in this Frugal Tahrpup :oops: .

One (the first I had loaded in this Pup) was running from symlinks to my data partition.

The other I had added recently to my 'all programs' sfs that I boot with all my Frugals.

So when I changed to the updated sfs for this tahrpup frugal, there were two copies in the system :shock: .

When I deleted the symlink version and ran just the sfs version, the weather display returned to normal (compare today's screenshot with earlier post).

David S.
Attachments
weather_sfs_only.jpg
weather rreport now fits screen with only one version running
(145.18 KiB) Downloaded 546 times

User avatar
davids45
Posts: 1326
Joined: Sun 26 Nov 2006, 23:33
Location: Chatswood, NSW

Slacko No-Go with Weather program

#59 Post by davids45 »

G'day,

Has any one been able to run this program in a recent Slacko Pup?

I get the normal large black terminal window asking to hit <Enter> but when I do, then it comes up with a short line of text & caret marks and stops (screenshot).

Not seeing this in non-Slacko Pups.

David S.
Attachments
weather-window-after-Enter.jpg
(13.39 KiB) Downloaded 435 times

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

#60 Post by musher0 »

Hi davids45.

The answer is temporarily: Nope.

Actually, the people at wttr.in have changed things at their end, so I am not sure
the script I produced a while back works anymore. I have to check, but I am short
on time ATM.

The default call from browser still works, though: http://wttr.in/YourCity, e.g.
http://wttr.in/Gatineau

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

Post Reply