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 12 Dec 2017, 12:33
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 3 of 4 [58 Posts]   Goto page: Previous 1, 2, 3, 4 Next
Author Message
davids45


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

PostPosted: Tue 26 Jul 2016, 20:05    Post subject: A stand-alone Config directory (not /var/tmp)?
Subject description: For ease of sharing info on a many-Pup computer
 

G'day/jour musher0,

Thanks for the continuing improvements to the "weather".

I see the expert information is held in separate files in /var/tmp.

I run lots of Pups on this computer and wherever possible, centralise personal program data such as config files on my data partition and symlink these out to the Pups. Every Pup has the same personal information so I don't need to do a lot of re-installing of profiles and the like. Any new or updated 'expert' information can be immediately shared by all Pups.

Could the 'expert' information (that is, stuff I create for me within the program as my 'profile') be held in a separate and specifically named directory, for example, /var/myweather/ or /root/.config/myweather? I then just symlink this special directory to keep every Pup up to date.

This is rather than use separate files in a 'general' directory like /var/tmp that other programs may also send files to? Symlinking every Pup's /var/tmp to my data partition may give problems with other programs or other programs could over-write my 'expert' profile.

This symlink of profile data is particularly handy with frugals who already share sfs files. Have you tried an .sfs yet as an alternative to the .pets?

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


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

PostPosted: Tue 26 Jul 2016, 23:45    Post subject: Re: A stand-alone Config directory (not /var/tmp)?
Subject description: For ease of sharing info on a many-Pup computer
 

davids45 wrote:
G'day/jour musher0,

Thanks for the continuing improvements to the "weather".

I see the expert information is held in separate files in /var/tmp.

I run lots of Pups on this computer and wherever possible, centralise personal program data such as config files on my data partition and symlink these out to the Pups. Every Pup has the same personal information so I don't need to do a lot of re-installing of profiles and the like. Any new or updated 'expert' information can be immediately shared by all Pups.

Could the 'expert' information (that is, stuff I create for me within the program as my 'profile') be held in a separate and specifically named directory, for example, /var/myweather/ or /root/.config/myweather? I then just symlink this special directory to keep every Pup up to date.

This is rather than use separate files in a 'general' directory like /var/tmp that other programs may also send files to? Symlinking every Pup's /var/tmp to my data partition may give problems with other programs or other programs could over-write my 'expert' profile.

This symlink of profile data is particularly handy with frugals who already share sfs files. Have you tried an .sfs yet as an alternative to the .pets?

David S.
Hi David.

My pleasure!

Interesting idea.

Not an sfs, no, because sfs's are static, and weather data is dynamic by nature.

A directory outside the pupsave file, possibly at /mnt/home/Weather comes to
mind. It could be accessed from different Pups. I'll give it some thought.

BFN.

~~~~~~~~~~~~~
PS. What do you think of this other idea?

_________________
musher0
~~~~~~~~~~
"Logical entities must not be multiplied beyond necessity." | |
« Il ne faut pas multiplier les entités logiques sans nécessité. » (Ockham)
Back to top
View user's profile Send private message 
musher0


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

PostPosted: Wed 27 Jul 2016, 16:05    Post subject:  

Hello again, David.

Here you go!

This little script will let you change where you store your weather reports. It's
reversible. From /var/tmp to /mnt/home/Vetero and vice versa. ("Vetero" is the
esperanto word for "weather".)

The script will move "almost" all your data from A to B. I say "almost": the only
caveat seems to be any longitude/latitude data that you would have: those will
have to be re-fetched in the usual way.

Any feedback on bugs is welcome, as you know.

Enjoy!
~~~~~~~~~~~
Code:
#!/bin/sh
# Vetero.sh # Change from /var/tmp to /mnt/home/Vetero and vice versa.
# Changer de /var/tmp à /mnt/home/Vetero et vice versa.
# Dépendance / dependency : replaceit
# (c) Christian L'Écuyer, alias « musher0 » (forum PuppyLinux),
#     ... Gatineau (Qc), Canada, 27 juillet 2016. GPL3. ...
#  /usr/share/doc/meteo-tradFR/gpl3_fr.sh affichera la license.
#  /usr/share/doc/meteo-tradFR/gpl3.sh will show the licence.
####
case "${LANG:0:2}" in
   fr)MssG="
\t\e[1;3;37mVeuillez entrer où vous voulez enregistrer les bulletins météo :

\t\t\e[1;3;37m'var' pour les enregistrer dans /var/tmp
\t   \e[1;3;37m'home' pour les enregistrer dans /mnt/home/Vetero\e[0m
" ;;   
   *)MssG="
\t\e[1;3;37mPlease type where you want your weather info to be stored:

\t\t\e[1;3;37m'var' if you want it stored in /var/tmp
\t   \e[1;3;37m'home' if you want it stored in /mnt/home/Vetero\e[0m
" ;;
esac
echo -e "$MssG"

read W

case "$W" in
   home)mkdir -p /mnt/home/Vetero # The word "weather" in esperanto!
   mv -f /var/tmp/* /mnt/home/Vetero
   replaceit --input=/usr/local/bin/meteo-tradFR-8a.sh "/var/tmp" "/mnt/home/Vetero"
   ;;
   var)# In reverse
   mkdir -p /var/tmp
   mv -f /mnt/home/Vetero/* /var/tmp
   replaceit --input=/usr/local/bin/meteo-tradFR-8a.sh "/mnt/home/Vetero" "/var/tmp"
   ;;
esac # echo $W

chmod +x /usr/local/bin/meteo-tradFR-8a.sh

case "${LANG:0:2}" in
   fr)NotE="
\t\e[1;3;37mNOTA -- Veuillez noter qu'un tel déplacement des données peut
\t\e[1;3;37mrendre inutilisables vos enregistrements en longitude et latitude.
\t\e[1;3;37mSi tel était le cas, veuillez effacer ces données en long./lat.
\t\e[1;3;37met demander de nouvelles prévisions avec ces coordonnéees.\e[0m
" ;;
   *)NotE="
\t\e[1;3;37mNOTE -- Please be aware that this move process can make your
\t\e[1;3;37mlongitude/latitude data unusable. If such was the case,
\t\e[1;3;37mplease erase the former long./lat. data and ask for a new 
\t\e[1;3;37mreport with the same coordinates.\e[0m
" ;;
esac
echo -e "$NotE"
Vetero.sh.zip
Description  Unzip in /usr/local/bin and make executable.
zip

 Download 
Filename  Vetero.sh.zip 
Filesize  1.04 KB 
Downloaded  84 Time(s) 

_________________
musher0
~~~~~~~~~~
"Logical entities must not be multiplied beyond necessity." | |
« Il ne faut pas multiplier les entités logiques sans nécessité. » (Ockham)
Back to top
View user's profile Send private message 
davids45


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

PostPosted: Wed 27 Jul 2016, 22:56    Post subject: Vetero script
Subject description: nothing happening
 

G'day/jour musher0,

I downloaded the .zip you posted and made the extract executable.

I run it in a terminal but get nothing but a blinking cursor after a few blank lines (see screenshot). (The screenshot happened during a blink of the cursor Rolling Eyes so it's missing )
There is no new directory in /mnt/home/ and my sydney.source file is still in /var/tmp
I have the dependency (replaceit) installed.

I'd like the weather package to put the sydney weather source file into /mnt/sda5/Puppy_Archive/weather/ rather than /var/tmp by default.

Is this what your script will do? I can then make my own pet from the installed files that will automatically include Sydney when this pet is installed into any new Pup. Likewise an sfs for the Frugals with Sydney already 'loaded' in the expert area.

Thanks,

David S.
image-7.png
 Description   missing cursor about halfway down window
 Filesize   21.11 KB
 Viewed   210 Time(s)

image-7.png

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


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

PostPosted: Thu 28 Jul 2016, 00:42    Post subject:  

Hi David.

Oops. Embarassed My oversight. I forgot that some people prefer their console to have
black type on a white background. I prefer white on black myself.

I used ANSI codes to color the type white, which is why you are seeing nothing...
Sorry about that... Embarassed

Ok. I'll change the color of the type. What is your favorite color ? Red? Green?
Blue? Very Happy How about purple? In ANSI we have a limited choice of 8 colors, but still.

Unless you have a ready-made black background console somewhere?

_________________
musher0
~~~~~~~~~~
"Logical entities must not be multiplied beyond necessity." | |
« Il ne faut pas multiplier les entités logiques sans nécessité. » (Ockham)
Back to top
View user's profile Send private message 
musher0


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

PostPosted: Thu 28 Jul 2016, 00:50    Post subject:  

Hopefully this will be better -- in green ! (Even if the screen capture is white on black.)

I also introduced some sanity checks and made sure that the appropriate menu
entries were changed as well.

Code:
#!/bin/sh
# Vetero.sh # Change from /var/tmp to /mnt/home/Vetero and vice versa.
# Changer de /var/tmp à /mnt/home/Vetero et vice versa.
# (c) Christian L'Écuyer, alias « musher0 » (forum PuppyLinux),
#     ... Gatineau (Qc), Canada, 27-28 juillet 2016. GPL3. ...
#  /usr/share/doc/meteo-tradFR/gpl3_fr.sh affichera la license.
#  /usr/share/doc/meteo-tradFR/gpl3.sh will show the licence.
####
case "${LANG:0:2}" in
   fr)MssG="
\t      \e[4mScript pour changer les données météo de répertoire\e[0m

\t\e[1;3;32mVeuillez entrer où vous voulez enregistrer les bulletins météo :

\t\t\e[1;3;32m'var' pour les enregistrer dans /var/tmp
\t   \e[1;3;32m'home' pour les enregistrer dans /mnt/home/Vetero\e[0m
" ;;   
   *)MssG="
\t        \e[4mScript to change the weather data directory\e[0m

\t\e[1;3;32mPlease type where you want your weather info to be stored:

\t\t\e[1;3;32m'var' if you want it stored in /var/tmp
\t   \e[1;3;32m'home' if you want it stored in /mnt/home/Vetero\e[0m
" ;;
esac
clear
echo -e "$MssG"

read W

case "$W" in
   home)if [ "`ls /mnt/home/Vetero`" != "" ];then
         [ "${LANG:0:2}" = "fr" ] && ActiF="Ce répertoire est déjà actif. Veuillez choisir l'autre !" || ActiF="This directory is already active. Please choose the other one."
         echo -e "\t\e[2;3;5m$ActiF\e[0m\n"
         exit
      else
         mkdir -p /mnt/home/Vetero # The word "weather" in esperanto!
         mv -f -u /var/tmp/* /mnt/home/Vetero
         for i in /usr/local/bin/meteo-tradFR-8a.sh /usr/local/share/Listes_Meteo/wttr.FR.lst /usr/local/share/Listes_Meteo/wttr.EN.lst
         do
            replaceit --input=$i "/var/tmp" "/mnt/home/Vetero"
            replaceit --input=$i "/var/tmp" "/mnt/home/Vetero"
         done
      fi ;;
   var)# In reverse
      if [ "`ls /var/tmp`" != "" ];then
         [ "${LANG:0:2}" = "fr" ] && ActiF="Ce répertoire est déjà actif. Veuillez choisir l'autre !" || ActiF="This directory is already active. Please choose the other one."
         echo -e "\t\e[2;3;5m$ActiF\e[0m\n"
         exit
      else
         mkdir -p /var/tmp
         mv -f -u /mnt/home/Vetero/* /var/tmp
         for i in /usr/local/bin/meteo-tradFR-8a.sh /usr/local/share/Listes_Meteo/wttr.FR.lst /usr/local/share/Listes_Meteo/wttr.EN.lst
         do
            replaceit --input=$i "/mnt/home/Vetero" "/var/tmp"
            replaceit --input=$i "/mnt/home/Vetero" "/var/tmp"
         done
      fi ;;
esac # echo $W

chmod +x /usr/local/bin/meteo-tradFR-8a.sh

case "${LANG:0:2}" in
   fr)NotE="
\t\e[1;3;32mNOTA -- Veuillez noter qu'un tel déplacement des données peut
\t\e[1;3;32mrendre inutilisables vos enregistrements en longitude et latitude.
\t\e[1;3;32mSi tel est le cas, veuillez effacer ces données en long./lat.
\t\e[1;3;32met demander de nouvelles prévisions avec ces coordonnéees.\e[0m
" ;;
   *)NotE="
\t\e[1;3;32mNOTE -- Please be aware that this move process can make your
\t\e[1;3;32mlongitude/latitude data unusable. If such was the case,
\t\e[1;3;32mplease erase the former long./lat. data and ask for a new 
\t\e[1;3;32mreport with the same coordinates.\e[0m
" ;;
esac
echo -e "$NotE"
Change-dir_2016-07-28(1).jpg
 Description   
 Filesize   21.57 KB
 Viewed   196 Time(s)

Change-dir_2016-07-28(1).jpg


_________________
musher0
~~~~~~~~~~
"Logical entities must not be multiplied beyond necessity." | |
« Il ne faut pas multiplier les entités logiques sans nécessité. » (Ockham)
Back to top
View user's profile Send private message 
ASD

Joined: 22 Mar 2016
Posts: 99

PostPosted: Thu 28 Jul 2016, 10:41    Post subject:  

Hi musher0,

Igor has not, thus far, replied to my (polite though he may well think cranky) email seeking his clarification of the precise meaning of his wttr output.

The screen shot showing the weather for New Orleans airport (where the time is exactly six hours earlier than here in England)
was taken using the terminal code "curl wttr.in/New?u"

The best sense I can make of the screen shot is:

The highlighted block (to which the green left arrow points) actually represents today 12.01 a.m. to 6.00 a.m. and, if this is correct, it seems, to me, to be highly misleading that it bears no description. It also seems that the green right arrow really displays the identical period for tomorrow.

It also seems, to me, that the four periods (if six hours each) would be better described as:
12.01 a.m. to 6.00 a.m. - Morning - Afternoon - 6.01 p.m. to 12.00 p.m.

Also, all the boxed blocks would then be best displayed by moving every block one space to its right except for the last block, which would be lost unless an extra day were to be shown (Sun 31 Jul in this case), with the highlighted block dropped down into the, now vacated, first position.
--------------------------------------------
The picture was taken a few minutes after noon (local time here in England) when the time in New Orleans was just after 6.00 a.m.
So, I would expect all data to refer to New Orleans time, but (strangely though hopefully not suspiciously) the rain spots for Noon today (though equally oddly for Noon on Sat 30) were flashing.
--------------------------------------------
On some minor points:
For the imperial measures I like Farenheit, Miles and Inches
I don't like the dots in the dates
As an option, I quite like plain white text on a black background.
--------------------------------------------
I am aware that you are aware of much, probably all, of the above and that you have already replaced Noon with Afternoon.
wttr.png
Description 
png

 Download 
Filename  wttr.png 
Filesize  48.67 KB 
Downloaded  93 Time(s) 
Back to top
View user's profile Send private message 
musher0


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

PostPosted: Thu 28 Jul 2016, 11:45    Post subject:  

Hello ASD.

I think you're basically right. The report could have a few extra words for the top
left "rectangle", such as "your weather now", perhaps. It wouldn't hurt at all.

Also, I always found strange in the wttr report that the day began at 6 am. That is
indeed confusing, because at change of date (normally midnight, no?) the forecast
for the current day appears, but you don't know for certain if the box at the far
right is for this night or the next.

As you say, the order of the boxes should be: night, morning, afternoon and
evening, optionally with hours of the day.

Technically, I am certain some Puppy developer could put the boxes in that order
at this end, it would only take perhaps a couple of seconds more to process and
then display.

The challenge is rather patience on the dev's part: if you look at the report in a
text editor, there's a forest of sensitive ANSI codes in there. How do you play
blocks with them? ANSI codes are also called "escape sequence codes", and this
escape sequence makes it difficult to work with them in awk or replaceit or even in
the bash strings processor.

And the killer argument, IMO: if a dev could correct the presentation logic at this
end, it wouldn't really solve the problem -- which is up river from this script, isn't?

About the discrepancy in your screen capture, the top box apparently not being
related to any other box in the report : it can happen that the forecast becomes a
prediction ?! Wink

As an aside, I don't know Mr. Chubin at all, but I'm sure he's a busy man, his
site serving the world, as I understand it.

If you are not happy with this type of weather report in console, here are others
that I have heard of:
-- the inxi utility has one
-- the BBC (I don't mean the news! They have a site similar to wttr.in.)
-- Also the US government at http://www.weather.gov/tg/siteloc.shtml,
-- and your own, no doubt. For ex. the Canadian government has its weather
agency at https://meteo.gc.ca/city/pages/qc-126_metric_f.html

Finally, you may have noticed that my latest version of the script allows the user
to get the weather report in Fahrenheit degrees as well as Celsius.

IHTH.

_________________
musher0
~~~~~~~~~~
"Logical entities must not be multiplied beyond necessity." | |
« Il ne faut pas multiplier les entités logiques sans nécessité. » (Ockham)
Back to top
View user's profile Send private message 
musher0


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

PostPosted: Thu 28 Jul 2016, 12:01    Post subject:  

@David:

The script below is almost the same as the one above, but the type is in "straight
green" rather than "bold green", for better readability (IMO) on black or white
background.

IHTH. BFN.

~~~~~~~~~~~
Code:
#!/bin/sh
# Vetero.sh # Change from /var/tmp to /mnt/home/Vetero and vice versa.
# Changer de /var/tmp à /mnt/home/Vetero et vice versa.
# (c) Christian L'Écuyer, alias « musher0 » (forum PuppyLinux),
#     ... Gatineau (Qc), Canada, 27-28 juillet 2016. GPL3. ...
#  /usr/share/doc/meteo-tradFR/gpl3_fr.sh affichera la license.
#  /usr/share/doc/meteo-tradFR/gpl3.sh will show the licence.
####
case "${LANG:0:2}" in
   fr)MssG="
\t      \e[4mScript pour changer les données météo de répertoire\e[0m

\t\e[32mVeuillez entrer où vous voulez enregistrer les bulletins météo :

\t\t\e[32m'var' pour les enregistrer dans /var/tmp
\t   \e[32m'home' pour les enregistrer dans /mnt/home/Vetero\e[0m
" ;;   
   *)MssG="
\t        \e[4mScript to change the weather data directory\e[0m

\t\e[32mPlease type where you want your weather info to be stored:

\t\t\e[32m'var' if you want it stored in /var/tmp
\t   \e[32m'home' if you want it stored in /mnt/home/Vetero\e[0m
" ;;
esac
clear
echo -e "$MssG"

read W

case "$W" in
   home)if [ "`ls /mnt/home/Vetero`" != "" ];then
         [ "${LANG:0:2}" = "fr" ] && ActiF="Ce répertoire est déjà actif. Veuillez choisir l'autre !" || ActiF="This directory is already active. Please choose the other one."
         echo -e "\t\e[2;3;5m$ActiF\e[0m\n"
         exit
      else
         mkdir -p /mnt/home/Vetero # The word "weather" in esperanto!
         mv -f -u /var/tmp/* /mnt/home/Vetero
         for i in /usr/local/bin/meteo-tradFR-8a.sh /usr/local/share/Listes_Meteo/wttr.FR.lst /usr/local/share/Listes_Meteo/wttr.EN.lst
         do
            replaceit --input=$i "/var/tmp" "/mnt/home/Vetero"
            replaceit --input=$i "/var/tmp" "/mnt/home/Vetero"
         done
      fi ;;
   var)# In reverse
      if [ "`ls /var/tmp`" != "" ];then
         [ "${LANG:0:2}" = "fr" ] && ActiF="Ce répertoire est déjà actif. Veuillez choisir l'autre !" || ActiF="This directory is already active. Please choose the other one."
         echo -e "\t\e[2;3;5m$ActiF\e[0m\n"
         exit
      else
         mkdir -p /var/tmp
         mv -f -u /mnt/home/Vetero/* /var/tmp
         for i in /usr/local/bin/meteo-tradFR-8a.sh /usr/local/share/Listes_Meteo/wttr.FR.lst /usr/local/share/Listes_Meteo/wttr.EN.lst
         do
            replaceit --input=$i "/mnt/home/Vetero" "/var/tmp"
            replaceit --input=$i "/mnt/home/Vetero" "/var/tmp"
         done
      fi ;;
esac # echo $W

chmod +x /usr/local/bin/meteo-tradFR-8a.sh

case "${LANG:0:2}" in
   fr)NotE="
\t\e[32mNOTA -- Veuillez noter qu'un tel déplacement des données peut
\t\e[32mrendre inutilisables vos enregistrements en longitude et latitude.
\t\e[32mSi tel est le cas, veuillez effacer ces données en long./lat.
\t\e[32met demander de nouvelles prévisions avec ces coordonnéees.\e[0m
" ;;
   *)NotE="
\t\e[32mNOTE -- Please be aware that this move process can make your
\t\e[32mlongitude/latitude data unusable. If such was the case,
\t\e[32mplease erase the former long./lat. data and ask for a new 
\t\e[32mreport with the same coordinates.\e[0m
" ;;
esac
echo -e "$NotE"
Vetero.sh.zip
Description  Unzip in /usr/local/bin and make executable before using.
zip

 Download 
Filename  Vetero.sh.zip 
Filesize  1.29 KB 
Downloaded  82 Time(s) 
Change-dir_2016-07-28(2).jpg
 Description   Pardon my use of the French, but it's as an illustration of the new color appearance.
I think it's quite readable now, independently of the color of the background.
 Filesize   55.39 KB
 Viewed   171 Time(s)

Change-dir_2016-07-28(2).jpg


_________________
musher0
~~~~~~~~~~
"Logical entities must not be multiplied beyond necessity." | |
« Il ne faut pas multiplier les entités logiques sans nécessité. » (Ockham)
Back to top
View user's profile Send private message 
ASD

Joined: 22 Mar 2016
Posts: 99

PostPosted: Thu 28 Jul 2016, 14:26    Post subject:  

Hi again,

Firstly, the level of detail and the display style is ideally suited to my needs, if only I fully understood the display.


However,
Quote:
The report could have a few extra words for the top
left "rectangle", such as "your weather now", perhaps. It wouldn't hurt at all.

I do not think it can ever be “now” for two reasons:
(1) because a specific point in time could never show a range of temperatures, and
(2) because, unless weirdly beyond credibility the last column should be the first column, any enquiry made within a few hours after midnight would never show the forecast for 12.01 a.m. to 6.00 a.m. nor would any much later same-day enquiry ever show the historical actuals for that period.

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 like your option to add any personal locations and I can get full imperial measures by adding ?u (at least I could last time I tried).

I very much like your app, I thank you for your responses and I wish you well, but the technical complexities you mention are beyond my level of understanding.
Back to top
View user's profile Send private message 
musher0


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

PostPosted: Thu 28 Jul 2016, 14:55    Post subject:  

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
~~~~~~~~~~
"Logical entities must not be multiplied beyond necessity." | |
« Il ne faut pas multiplier les entités logiques sans nécessité. » (Ockham)
Back to top
View user's profile Send private message 
davids45


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

PostPosted: Thu 28 Jul 2016, 21:00    Post subject: Vetero - next test
Subject description: Colourful, but lib problem?
 

G'jour/day musher0,

Thanks for the updated Vetero file.
I can now read the terminal text Very Happy .

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 Embarassed .

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.
fullscreen160729.png
 Description   
 Filesize   136.18 KB
 Viewed   121 Time(s)

fullscreen160729.png

terminal_after.png
 Description   first try then trying after lib symlink
 Filesize   187.2 KB
 Viewed   116 Time(s)

terminal_after.png

meteo_mnt_home_after.png
 Description   
 Filesize   53.06 KB
 Viewed   119 Time(s)

meteo_mnt_home_after.png

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


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

PostPosted: Thu 28 Jul 2016, 21:53    Post subject:  

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!) Smile

BFN.

_________________
musher0
~~~~~~~~~~
"Logical entities must not be multiplied beyond necessity." | |
« Il ne faut pas multiplier les entités logiques sans nécessité. » (Ockham)
Back to top
View user's profile Send private message 
Pelo

Joined: 10 Sep 2011
Posts: 12591
Location: Mer méditerrannée (1 kms°)

PostPosted: Thu 28 Jul 2016, 22:13    Post subject: Would'nt it be better in Personal category than in Business  

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)
Thunder.jpg
 Description   Les éclairs clignotent, Well !
 Filesize   66.31 KB
 Viewed   101 Time(s)

Thunder.jpg


_________________
Passenger Pelo ! don't ask him to repair the aircraft. Don't use him as a demining dog .... pleeease.
Back to top
View user's profile Send private message Yahoo Messenger 
davids45


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

PostPosted: Thu 28 Jul 2016, 23:13    Post subject: One Weather report, many Pups sharing
Subject description: Symlink needed is wttr.EN.lst, not the /var/tmp files
 

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.
slacko_window.png
 Description   
 Filesize   23.41 KB
 Viewed   106 Time(s)

slacko_window.png

slacko_window_linktosda5.png
 Description   
 Filesize   24.74 KB
 Viewed   106 Time(s)

slacko_window_linktosda5.png

slacko_meteo.png
 Description   
 Filesize   9.33 KB
 Viewed   100 Time(s)

slacko_meteo.png

Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 3 of 4 [58 Posts]   Goto page: Previous 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.1088s ][ Queries: 14 (0.0080s) ][ GZIP on ]